| BinaryHeapPriorityQueueTElement Class |
Namespace: SD.Tools.Algorithmia.PriorityQueues
public class BinaryHeapPriorityQueue<TElement> : PriorityQueueBase<TElement> where TElement : class
The BinaryHeapPriorityQueueTElement type exposes the following members.
| Name | Description | |
|---|---|---|
| BinaryHeapPriorityQueueTElement |
Initializes a new instance of the BinaryHeapPriorityQueueTElement class.
|
| Name | Description | |
|---|---|---|
| Count |
Gets the number of elements in the queue
(Overrides PriorityQueueBaseTElementCount.) | |
| PriorityComparison |
Gets the priority comparison.
(Inherited from PriorityQueueBaseTElement.) |
| Name | Description | |
|---|---|---|
| Add |
Adds the specified element to the queue
(Overrides PriorityQueueBaseTElementAdd(TElement).) | |
| Clear |
Clears the queue.
(Overrides PriorityQueueBaseTElementClear.) | |
| Contains |
Determines whether the queue contains the element specified
(Overrides PriorityQueueBaseTElementContains(TElement).) | |
| 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.) | |
| GetEnumerator |
Throws a NotSupportException, as binary heaps can't be enumerated.
(Overrides PriorityQueueBaseTElementGetEnumerator.) | |
| GetHashCode | Serves as the default hash function. (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.) | |
| Peek |
Peeks at the first element of the queue (the one with the highest priority, according to the priority comparison) and returns that element
without removing it
(Overrides PriorityQueueBaseTElementPeek.) | |
| Remove |
Removes the first element from the queue, if the queue isn't empty.
(Overrides PriorityQueueBaseTElementRemove.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
| IEnumerableTElementGetEnumerator |
Returns an enumerator that iterates through the collection.
(Inherited from PriorityQueueBaseTElement.) | |
| IEnumerableGetEnumerator |
Returns an enumerator that iterates through a collection.
(Inherited from PriorityQueueBaseTElement.) |
Heaps can't store value types. This is because changing a value type really makes it a different value, while changing the contents of an object doesn't make it a different object. This priority queue, based on a heap, can't store value types either.