Library
Module
Module type
Parameter
Class
Class type
type elt = Elt.t
The type of the set elements
An interval: a range (x, y) of set values where all the elements from x to y inclusive are in the set
module Interval : sig ... end
val pp : Format.formatter -> t -> unit
Pretty-print a set
val empty : t
The empty set
val is_empty : t -> bool
Test whether a set is empty or not
fold f t acc
folds f
across all the intervals in t
fold_individual f t acc
folds f
across all the individual elements of t
min_elt t
returns the smallest (in terms of the ordering) interval in t
, or raises Not_found
if the set is empty.
max_elt t
returns the largest (in terms of the ordering) interval in t
, or raises Not_found
if the set is empty.
take n
returns Some a, b
where cardinal a = n
and diff t a = b
or None
if cardinal t < n