Implements a heap based priority queue that hold only keys. The key with the minimum value can then retrieved from the queue. This class is not thread safe.
Constructor | Description |
Full Usage:
PriorityQueue()
|
|
Full Usage:
PriorityQueue(capacity)
Parameters:
int
-
The initial capacity.
|
|
Instance member | Description | ||
Full Usage:
this.Count
Returns: int
|
Gets the number of elements in the queue.
|
||
Full Usage:
this.Dequeue
Returns: 'TKey
Minimum key value.
|
Dequeues the minimum key value. An exception is thrown if the queue is empty.
|
||
Full Usage:
this.Enqueue
Parameters:
'TKey
-
The key value.
|
Adds the specified key to the queue.
|
||
Full Usage:
this.IsEmpty
Returns: bool
|
Gets a value indicating whether the queue is empty.
|
||
Full Usage:
this.Peek
Returns: 'TKey
Minimum key value.
|
Peeks the element with the minimum key value. An exception is thrown if the queue is empty.
|