sig
type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Format.formatter -> 'a -> unit
module type ORD =
sig type t val compare : CCWBTree.ORD.t -> CCWBTree.ORD.t -> int end
module type KEY =
sig type t val compare : t -> t -> int val weight : t -> int end
module type S =
sig
type key
type +'a t
val empty : 'a CCWBTree.S.t
val is_empty : 'a CCWBTree.S.t -> bool
val singleton : CCWBTree.S.key -> 'a -> 'a CCWBTree.S.t
val mem : CCWBTree.S.key -> 'a CCWBTree.S.t -> bool
val get : CCWBTree.S.key -> 'a CCWBTree.S.t -> 'a option
val get_exn : CCWBTree.S.key -> 'a CCWBTree.S.t -> 'a
val nth : int -> 'a CCWBTree.S.t -> (CCWBTree.S.key * 'a) option
val nth_exn : int -> 'a CCWBTree.S.t -> CCWBTree.S.key * 'a
val get_rank :
CCWBTree.S.key ->
'a CCWBTree.S.t -> [ `After of int | `At of int | `First ]
val add : CCWBTree.S.key -> 'a -> 'a CCWBTree.S.t -> 'a CCWBTree.S.t
val remove : CCWBTree.S.key -> 'a CCWBTree.S.t -> 'a CCWBTree.S.t
val update :
CCWBTree.S.key ->
('a option -> 'a option) -> 'a CCWBTree.S.t -> 'a CCWBTree.S.t
val cardinal : 'a CCWBTree.S.t -> int
val weight : 'a CCWBTree.S.t -> int
val fold :
f:('b -> CCWBTree.S.key -> 'a -> 'b) -> x:'b -> 'a CCWBTree.S.t -> 'b
val mapi :
f:(CCWBTree.S.key -> 'a -> 'b) -> 'a CCWBTree.S.t -> 'b CCWBTree.S.t
val map : f:('a -> 'b) -> 'a CCWBTree.S.t -> 'b CCWBTree.S.t
val iter : f:(CCWBTree.S.key -> 'a -> unit) -> 'a CCWBTree.S.t -> unit
val split :
CCWBTree.S.key ->
'a CCWBTree.S.t -> 'a CCWBTree.S.t * 'a option * 'a CCWBTree.S.t
val merge :
f:(CCWBTree.S.key -> 'a option -> 'b option -> 'c option) ->
'a CCWBTree.S.t -> 'b CCWBTree.S.t -> 'c CCWBTree.S.t
val extract_min :
'a CCWBTree.S.t -> CCWBTree.S.key * 'a * 'a CCWBTree.S.t
val extract_max :
'a CCWBTree.S.t -> CCWBTree.S.key * 'a * 'a CCWBTree.S.t
val choose : 'a CCWBTree.S.t -> (CCWBTree.S.key * 'a) option
val choose_exn : 'a CCWBTree.S.t -> CCWBTree.S.key * 'a
val random_choose :
Random.State.t -> 'a CCWBTree.S.t -> CCWBTree.S.key * 'a
val add_list :
'a CCWBTree.S.t -> (CCWBTree.S.key * 'a) list -> 'a CCWBTree.S.t
val of_list : (CCWBTree.S.key * 'a) list -> 'a CCWBTree.S.t
val to_list : 'a CCWBTree.S.t -> (CCWBTree.S.key * 'a) list
val add_seq :
'a CCWBTree.S.t ->
(CCWBTree.S.key * 'a) CCWBTree.sequence -> 'a CCWBTree.S.t
val of_seq : (CCWBTree.S.key * 'a) CCWBTree.sequence -> 'a CCWBTree.S.t
val to_seq : 'a CCWBTree.S.t -> (CCWBTree.S.key * 'a) CCWBTree.sequence
val add_gen :
'a CCWBTree.S.t ->
(CCWBTree.S.key * 'a) CCWBTree.gen -> 'a CCWBTree.S.t
val of_gen : (CCWBTree.S.key * 'a) CCWBTree.gen -> 'a CCWBTree.S.t
val to_gen : 'a CCWBTree.S.t -> (CCWBTree.S.key * 'a) CCWBTree.gen
val print :
CCWBTree.S.key CCWBTree.printer ->
'a CCWBTree.printer -> 'a CCWBTree.S.t CCWBTree.printer
val node_ :
CCWBTree.S.key ->
'a -> 'a CCWBTree.S.t -> 'a CCWBTree.S.t -> 'a CCWBTree.S.t
val balanced : 'a CCWBTree.S.t -> bool
end
module Make :
functor (X : ORD) ->
sig
type key = X.t
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> 'a t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
val nth : int -> 'a t -> (key * 'a) option
val nth_exn : int -> 'a t -> key * 'a
val get_rank : key -> 'a t -> [ `After of int | `At of int | `First ]
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val cardinal : 'a t -> int
val weight : 'a t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t
val map : f:('a -> 'b) -> 'a t -> 'b t
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t
val merge :
f:(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val extract_min : 'a t -> key * 'a * 'a t
val extract_max : 'a t -> key * 'a * 'a t
val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
val random_choose : Random.State.t -> 'a t -> key * 'a
val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_seq : 'a t -> (key * 'a) sequence -> 'a t
val of_seq : (key * 'a) sequence -> 'a t
val to_seq : 'a t -> (key * 'a) sequence
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val print : key printer -> 'a printer -> 'a t printer
val node_ : key -> 'a -> 'a t -> 'a t -> 'a t
val balanced : 'a t -> bool
end
module MakeFull :
functor (X : KEY) ->
sig
type key = X.t
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val singleton : key -> 'a -> 'a t
val mem : key -> 'a t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
val nth : int -> 'a t -> (key * 'a) option
val nth_exn : int -> 'a t -> key * 'a
val get_rank : key -> 'a t -> [ `After of int | `At of int | `First ]
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val cardinal : 'a t -> int
val weight : 'a t -> int
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t
val map : f:('a -> 'b) -> 'a t -> 'b t
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val split : key -> 'a t -> 'a t * 'a option * 'a t
val merge :
f:(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val extract_min : 'a t -> key * 'a * 'a t
val extract_max : 'a t -> key * 'a * 'a t
val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
val random_choose : Random.State.t -> 'a t -> key * 'a
val add_list : 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val to_list : 'a t -> (key * 'a) list
val add_seq : 'a t -> (key * 'a) sequence -> 'a t
val of_seq : (key * 'a) sequence -> 'a t
val to_seq : 'a t -> (key * 'a) sequence
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val print : key printer -> 'a printer -> 'a t printer
val node_ : key -> 'a -> 'a t -> 'a t -> 'a t
val balanced : 'a t -> bool
end
end