sig
type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a klist = unit -> [ `Cons of 'a * 'a CCHeap.klist | `Nil ]
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a CCHeap.ktree list ]
type 'a printer = Format.formatter -> 'a -> unit
module type PARTIAL_ORD =
sig
type t
val leq : CCHeap.PARTIAL_ORD.t -> CCHeap.PARTIAL_ORD.t -> bool
end
module type S =
sig
type elt
type t
val empty : CCHeap.S.t
val is_empty : CCHeap.S.t -> bool
exception Empty
val merge : CCHeap.S.t -> CCHeap.S.t -> CCHeap.S.t
val insert : CCHeap.S.elt -> CCHeap.S.t -> CCHeap.S.t
val add : CCHeap.S.t -> CCHeap.S.elt -> CCHeap.S.t
val filter : (CCHeap.S.elt -> bool) -> CCHeap.S.t -> CCHeap.S.t
val find_min : CCHeap.S.t -> CCHeap.S.elt option
val find_min_exn : CCHeap.S.t -> CCHeap.S.elt
val take : CCHeap.S.t -> (CCHeap.S.t * CCHeap.S.elt) option
val take_exn : CCHeap.S.t -> CCHeap.S.t * CCHeap.S.elt
val iter : (CCHeap.S.elt -> unit) -> CCHeap.S.t -> unit
val fold : ('a -> CCHeap.S.elt -> 'a) -> 'a -> CCHeap.S.t -> 'a
val size : CCHeap.S.t -> int
val to_list : CCHeap.S.t -> CCHeap.S.elt list
val add_list : CCHeap.S.t -> CCHeap.S.elt list -> CCHeap.S.t
val of_list : CCHeap.S.elt list -> CCHeap.S.t
val add_seq : CCHeap.S.t -> CCHeap.S.elt CCHeap.sequence -> CCHeap.S.t
val of_seq : CCHeap.S.elt CCHeap.sequence -> CCHeap.S.t
val to_seq : CCHeap.S.t -> CCHeap.S.elt CCHeap.sequence
val add_klist : CCHeap.S.t -> CCHeap.S.elt CCHeap.klist -> CCHeap.S.t
val of_klist : CCHeap.S.elt CCHeap.klist -> CCHeap.S.t
val to_klist : CCHeap.S.t -> CCHeap.S.elt CCHeap.klist
val add_gen : CCHeap.S.t -> CCHeap.S.elt CCHeap.gen -> CCHeap.S.t
val of_gen : CCHeap.S.elt CCHeap.gen -> CCHeap.S.t
val to_gen : CCHeap.S.t -> CCHeap.S.elt CCHeap.gen
val to_tree : CCHeap.S.t -> CCHeap.S.elt CCHeap.ktree
val print :
?sep:string ->
CCHeap.S.elt CCHeap.printer -> CCHeap.S.t CCHeap.printer
end
module Make :
functor (E : PARTIAL_ORD) ->
sig
type elt = E.t
type t
val empty : t
val is_empty : t -> bool
exception Empty
val merge : t -> t -> t
val insert : elt -> t -> t
val add : t -> elt -> t
val filter : (elt -> bool) -> t -> t
val find_min : t -> elt option
val find_min_exn : t -> elt
val take : t -> (t * elt) option
val take_exn : t -> t * elt
val iter : (elt -> unit) -> t -> unit
val fold : ('a -> elt -> 'a) -> 'a -> t -> 'a
val size : t -> int
val to_list : t -> elt list
val add_list : t -> elt list -> t
val of_list : elt list -> t
val add_seq : t -> elt sequence -> t
val of_seq : elt sequence -> t
val to_seq : t -> elt sequence
val add_klist : t -> elt klist -> t
val of_klist : elt klist -> t
val to_klist : t -> elt klist
val add_gen : t -> elt gen -> t
val of_gen : elt gen -> t
val to_gen : t -> elt gen
val to_tree : t -> elt ktree
val print : ?sep:string -> elt printer -> t printer
end
end