module Int_set:Mutable finite sets of non-negative integers.sig..end
Testing membership and adding an element are O(log(N)), where N is the largest element in the set.
The representation uses a compressed form of a complete d-ary tree, and so
is space efficient when the integers in the set form contiguous ranges.
More precisely, the space used is O(log(N) * R), where R is the number of
contiguous ranges in the set.
type t
include Sexpable
val length : t -> intval is_empty : t -> boolval invariant : t -> unitval to_string : t -> stringval create : ?log2_degree:int -> unit -> tval mem : t -> int -> boolval add : t -> int -> unitval add_range : t -> lo:int -> hi:int -> unitval min_element : t -> int optionval max_element : t -> int option