module HeapOfArray (
A
:
ArrayType
)
(
E
:
ComparableType
with type t = A.elt
)
: sig
.. end
Heap implementation in a vector. Minimum gets first out.
Parameters: |
A |
: |
ArrayType
|
E |
: |
ComparableType with type t = A.elt
|
|
module V: Vector.OfArray
(
A
)
type
t = {
|
mutable v : V.t ; |
|
mutable back : int ; |
}
type
elt = V.elt
val create : ?size:int -> unit -> t
val is_empty : t -> bool
val clear : t -> unit
val add : t -> V.elt -> unit
val push : t -> V.elt -> unit
val peek_min : t -> V.elt
val pop_min : t -> V.elt
val size : t -> int