Aardvark.Base.Incremental


PriorityQueue<'a>

represents a simple priority queue using user-given compare function

Constructors

ConstructorDescription
new(cmp)
Signature: (cmp:('a -> 'a -> int)) -> PriorityQueue<'a>

Instance members

Instance memberDescription
Count
Signature: int

returns the number of elements currently contained in the queue

Dequeue()
Signature: unit -> 'a

dequeues the min element from the queue and fails if the queue is empty

Enqueue(v)
Signature: v:'a -> unit

enqueues a new element

Min
Signature: 'a

returns the current minimal value (according to cmp) contained and fails if the queue is empty.

Fork me on GitHub