![]() | Priority |
public sealed class PriorityQueue<T> : IEnumerable<T>, IEnumerable, ICollection<T>, ICollection
The PriorityQueue<T> type exposes the following members.
Name | Description | |
---|---|---|
![]() | PriorityQueue<T>() | Initializes a new instance of the PriorityQueue<T> class that is empty, has the default initial capacity, and uses the default IComparer<T> implementation for the element type. |
![]() | PriorityQueue<T>(IComparer<T>) | Initializes a new instance of the PriorityQueue<T> class that is empty, has the default initial capacity, and uses the specified IComparer<T> implementation to compare elements. |
![]() | PriorityQueue<T>(IEnumerable<T>) | Initializes a new instance of the PriorityQueue<T> that contains elements copied from the specified IEnumerable<T> and uses the default IComparer<T> implementation for the element type. |
![]() | PriorityQueue<T>(IEnumerable<T>, IComparer<T>) | Initializes a new instance of the PriorityQueue<T> that contains elements copied from the specified IEnumerable<T> and that uses the specified IComparer<T> implementation to compare keys. |
![]() | PriorityQueue<T>(Int32, IComparer<T>) | Initializes a new instance of the PriorityQueue<T> class that is empty, has the specified initial capacity, and uses the specified IComparer<T> implementation to compare elements. |
Name | Description | |
---|---|---|
![]() | Capacity | Gets or sets the total number of elements the internal data structure can hold without resizing. |
![]() | Comparer | Gets the IComparer<T> that is used to compare the elements of the priority queue. |
![]() | Count | Gets the number of elements contained in the PriorityQueue<T>. |
Name | Description | |
---|---|---|
![]() | AdjustFirstItem | Indicates that the current first item of the PriorityQueue<T> was modified and its priority has to be re-evaluated. |
![]() | CheckHeap | Checks the heap. Used for debug purposes. |
![]() | Clear | Removes all objects from the PriorityQueue<T>. |
![]() | Contains | Determines whether an element is in the PriorityQueue<T>. |
![]() | CopyTo | Copies the PriorityQueue<T> elements to an existing one-dimensional Array, starting at the specified array index. |
![]() | Dequeue | Removes and return the element with the lowest value from the PriorityQueue<T>. |
![]() | Enqueue | Adds an object to the PriorityQueue<T>. |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
![]() | GetEnumerator | Returns an enumerator that iterates through the values in the PriorityQueue<T>. |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) |
![]() | Peek | Return the object with the lowest value in the PriorityQueue<T> without removing it. |
![]() | Remove | Removes the specified item from the PriorityQueue<T>. |
![]() | ToArray | Copies the PriorityQueue<T> elements to a new array. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object) |
![]() | TrimExcess | Sets the capacity to the actual number of elements in the PriorityQueue<T>, if that number is less than a threshold value. |
Name | Description | |
---|---|---|
![]() | GetSequenceHashCode<T> |
Gets the hash code for the specified sequence of elements.
(Defined by ListExtensions) |
![]() | OrderBy<T, TKey> |
Sorts the elements of a sequence in ascending or descending order according to a key.
(Defined by ListExtensions) |
![]() | ToDelimitedString<T> |
Creates a string with the items of a list separated by a comma.
(Defined by ListExtensions) |
![]() | ToDelimitedString<T> |
Creates a string with the items of a list separated by the specified delimiter.
(Defined by ListExtensions) |
The items must be immutable as long as they are in the PriorityQueue<T>. The only exception is the first item, which you may modify if you call AdjustFirstItem() immediately afterward.