package orsetto
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=f64814687276bad56483b2b8dfaaf70d0d6485f67fe5d44bff34bfa47af1896e
md5=3a15a377800cf988a310b4082406c685
doc/orsetto.cf/Cf_rbtree/Set/Create/index.html
Module Set.Create
A functor to create a Set module.
Parameters
module E : Cf_relations.OrderSignature
val nil : tThe empty set.
Use min u to return the ordinally least element in u. Raises Not_found if u is empty.
Use min u to return the ordinally greatest element in u. Raises Not_found if u is empty.
val empty : t -> boolUse empty u to test whether u is the empty set.
val size : t -> intUse size u to compute the size of u.
Use compare u1 u2 to compare the sequence of elements in u1 and the sequence of elements in u2 in order of increasing ordinality. Two sets are ordinally equal if the sequences of their elements are ordinally equal.
Use put e u to obtain a new set produced by inserting the element e into u. If s already contains a member ordinally equal to e then it is replaced by e in the set returned.
Use clear e u to obtain a new set produced by deleting the element in u ordinally equal to the element e. If there is no such element in the set, then the set is returned unchanged.
Use union u1 u2 to obtain a new set from the union of u1 and u2. Elements of the new set belonging to the intersection are copied from u2.
Use interset u1 u2 to obtain a new set from the intersection of u1 and u2. All the elements in the new set are copied from u2.
Use of_seq s to consume a sequence s and compose a new set by inserting each value produced in the order produced.
Use of_seq_incr s to compose the set with elements in the sequence s. Runs in linear time if the sequence c is known to be in increasing order. Otherwise, there is an additional linear cost beyond of_seq s.
Use of_seq_decr s to compose the set with elements in the sequence s. Runs in linear time if the sequence c is known to be in decreasing order. Otherwise, there is an additional linear cost beyond of_seq s.
Use to_seq_incr u to produce the list of elements in u in order of increasing ordinality.
Use to_seq_decr u to produce the list of elements in u in order of decreasing ordinality.
Use to_seq_nearest_decr e u to obtain the element ordinally less than or equal to e in u. Raises Not_found if u is empty or all the keys are ordinally greater.