package containers-data

  1. Overview
  2. Docs

Module type CCMutHeap_intf.SSource

Sourcetype elt

Type of elements

Sourcetype t

Heap of elt, whose priority is increased or decreased incrementally (see decrease for instance)

Sourceval create : unit -> t

Create a heap

Sourceval decrease : t -> elt -> unit

decrease h x decreases the value associated to x within h

Sourceval increase : t -> elt -> unit

increase h x increases the value associated to x within h

Sourceval in_heap : elt -> bool
Sourceval size : t -> int

Number of integers within the heap

Sourceval is_empty : t -> bool
Sourceval clear : t -> unit

Clear the content of the heap

Sourceval insert : t -> elt -> unit

Insert a new element into the heap

Sourceval remove_min : t -> elt

Remove and return the integer that has the lowest value from the heap

Sourceval filter : t -> (elt -> bool) -> unit

Filter out values that don't satisfy the predicate

OCaml

Innovation. Community. Security.