PatriciaTree.MakeSet
module Key : HomogeneousKey
Underlying basemap, for cross map/set operations
type t = unit BaseMap.t
This part of the interface should be a subset of Set.S
type key = unit BaseMap.key
val empty : t
val is_empty : t -> bool
val cardinal : t -> int
Returns the (key,value) where Key.to_int key
is minimal (in unsigned representation of integers); O(log n) complexity.
Returns the (key,value) where Key.to_int key
is maximal (in unsigned representation of integers); O(log n) complexity.
The following functions are not in Set.S.
pop_minimum m
returns None
if is_empty m
, or Some(key,m')
where key = min_elt m
and m' = remove m key
. O(log(n)) complexity.
pop_maximum m
returns None
if is_empty m
, or Some(key,m')
where key = max_elt m
and m' = remove m key
. O(log(n)) complexity.