module MakeMax: functor (E : OrderedType) -> Max with type elt := E.t
Functor building an implementation of the max-priority queue structure given a totally ordered type for elements.
| Parameters: |
|
type t
type elt
val create : unit -> t
val length : t -> int
val is_empty : t -> bool
val add : t -> elt -> unit
val add_iter : t -> ((elt -> unit) -> 'x -> unit) -> 'x -> unit
val max_elt : t -> elt option
val get_max_elt : t -> elt
val pop_max : t -> elt option
val remove_max : t -> unit
val clear : t -> unit
val copy : t -> t
val of_array : elt array -> t
val of_list : elt list -> t
val of_iter : ((elt -> unit) -> 'x -> unit) -> 'x -> t
val iter_unordered : (elt -> unit) -> t -> unit
val fold_unordered : ('acc -> elt -> 'acc) -> 'acc -> t -> 'acc
© 1995-2025 INRIA.
https://ocaml.org/manual/5.4/api/Pqueue.MakeMax.html