PatriciaTree.MakeSet
module Key : HomogeneousKey
type elt = Key.t
module BaseMap :
HeterogeneousMap_S with type _ key = elt and type (_, _) value = unit
Underlying basemap, for cross map/set operations
Stdlib.Set.S
This part of the interface should be a subset of Stdlib.Set.S
type key = elt
type t = unit BaseMap.t
val empty : t
val is_empty : t -> bool
val cardinal : t -> int
The following functions are not in Stdlib.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.
val pretty :
?pp_sep:(Stdlib.Format.formatter -> unit -> unit) ->
(Stdlib.Format.formatter -> elt -> unit) ->
Stdlib.Format.formatter ->
t ->
unit
pp_sep
defaults to Format.pp_print_cut
Conversion functions