PriorityQueueTKey, TValue Methods |
The PriorityQueueTKey, TValue generic type exposes the following members.
Name | Description | |
---|---|---|
Clear |
Clears and empties queue.
| |
Clone |
Make a clone of the priority queue. It makes a full clone of
the queue structure, but the values and keys in the queue are
not cloned.
| |
Dequeue |
Take the first element out of the queue and return it. the first
element is the one with the largest key.
| |
Enqueue |
Add a new element to the queue, with the given priority
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FindFirstNodeAfter |
Finds the first node in the priority queue which comes after any node having
the provided key, i.e. the node with the largest key value less than the provided key value.
It does a tree search, and should only be used to find key values that are close to the root key, example queue.FindeFirstNodeAfter(queue.FirstNode.Key) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToArray |
Copies the elements of the priority queue to a new array,
sorts it and returns it in priority order.
This is an O(n log(n)) operation | |
ToNodeArray |
Copies the nodes of the priority queue to a new array,
sorts it and returns it in priority order.
This is an O(n log(n)) operation | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |