Page
Library
Module
Module type
Parameter
Class
Class type
Source
Discrete.MakeSourceFunctor building an implementation of the RangeSet.Discrete structure given a totally ordered type.
module Ord : OrderedTypeThe type of the sets.
The type of the range. A range consists of start and end endpoint.
range_to_string range is the written representation of range.
add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged.
of_point p1 p2 returns the set containing a range from p1 to p2.
merge r s returns a set containing all elements of s , plus range r.
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.
Set difference: diff s1 s2 contains the elements of s1 that are not in s2.
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.