Pqueue.MakeMax(3)

NAME
Pqueue.MakeMax - Functor building an implementation of the max-priority queue structure given a totally ordered type for elements.

Module
Module Pqueue.MakeMax

Documentation

Module MakeMax
 : (E : OrderedType) -> sig end

Functor building an implementation of the max-priority queue structure given a totally ordered type for elements.

Parameters:

"E" Pqueue.OrderedType

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