Discrete.S
Output signature of the functor RangeSet.Discrete.Make
.
The type of the range. A range consists of start
and end
endpoint.
val range_to_string : range -> string
range_to_string range
is the written representation of range
.
val to_string : t -> string
to_string set
is the written representation of set
.
val empty : t
The empty set.
val is_empty : t -> bool
is_empty t
tests whether t
is empty or not.
add x s
returns a set containing all elements of s
, plus x
. If x
was already in s
, s
is returned unchanged.
unmerge r s
returns a set containing all elements of s, except those in range r
.
cover r s
returns a set containing elements both belongs to range r
and set s
.
Return the smallest element of the given set (with respect to the Ord.compare
ordering), or raise Not_found
if the set is empty.
Return the smallest element of the given set (with respect to the Ord.compare
ordering), or None
if the set is empty.
Return the largest element of the given set (with respect to the Ord.compare
ordering), or raise Not_found
if the set is empty.
Return the largest element of the given set (with respect to the Ord.compare
ordering), or None
if the set is empty.
iter_elt f s
applies f
in turn to all elements of s
. The elements of s
are presented to f
in increasing order with respect to the ordering over the type of the elements.
map_elt f s
is the set whose elements are f a0
,f a1
... f
aN
, where a0
,a1
...aN
are the elements of s
.
The elements are passed to f
in increasing order with respect to the ordering over the type of the elements.