package orsetto
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=151ca6df499bd3de7aa89a4e1627411fbee24c4dea6e0e71ce21f06f181ee654
md5=00393728b481c2bf15919a8202732335
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.