PriorityQueue<'a>
represents a simple priority queue using user-given compare function
Constructors
Constructor | Description |
new(cmp)
Signature: (cmp:('a -> 'a -> int)) -> PriorityQueue<'a>
|
|
Instance members
Instance member | Description |
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.
|