Click or drag to resize

PriorityQueueT Class

Provides a queue where the element with the lowest value is always at the front of the queue.
Inheritance Hierarchy
SystemObject
  Ookii.JumboPriorityQueueT

Namespace:  Ookii.Jumbo
Assembly:  Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax
public sealed class PriorityQueue<T> : IEnumerable<T>, 
	IEnumerable, ICollection<T>, ICollection

Type Parameters

T
The type of elements in the priority queue.

The PriorityQueueT type exposes the following members.

Constructors
  NameDescription
Public methodPriorityQueueT
Initializes a new instance of the PriorityQueueT class that is empty, has the default initial capacity, and uses the default IComparerT implementation for the element type.
Public methodPriorityQueueT(IComparerT)
Initializes a new instance of the PriorityQueueT class that is empty, has the default initial capacity, and uses the specified IComparerT implementation to compare elements.
Public methodPriorityQueueT(IEnumerableT)
Initializes a new instance of the PriorityQueueT that contains elements copied from the specified IEnumerableT and uses the default IComparerT implementation for the element type.
Public methodPriorityQueueT(IEnumerableT, IComparerT)
Initializes a new instance of the PriorityQueueT that contains elements copied from the specified IEnumerableT and that uses the specified IComparerT implementation to compare keys.
Public methodPriorityQueueT(Int32, IComparerT)
Initializes a new instance of the PriorityQueueT class that is empty, has the specified initial capacity, and uses the specified IComparerT implementation to compare elements.
Top
Properties
  NameDescription
Public propertyCapacity
Gets or sets the total number of elements the internal data structure can hold without resizing.
Public propertyComparer
Public propertyCount
Gets the number of elements contained in the PriorityQueueT.
Top
Methods
  NameDescription
Public methodAdjustFirstItem
Indicates that the current first item of the PriorityQueueT was modified and its priority has to be re-evaluated.
Public methodCheckHeap
Checks the heap. Used for debug purposes.
Public methodClear
Removes all objects from the PriorityQueueT.
Public methodContains
Determines whether an element is in the PriorityQueueT.
Public methodCopyTo
Copies the PriorityQueueT elements to an existing one-dimensional Array, starting at the specified array index.
Public methodDequeue
Removes and return the element with the lowest value from the PriorityQueueT.
Public methodEnqueue
Adds an object to the PriorityQueueT.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the values in the PriorityQueueT.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodPeek
Return the object with the lowest value in the PriorityQueueT without removing it.
Public methodRemove
Removes the specified item from the PriorityQueueT.
Public methodToArray
Copies the PriorityQueueT elements to a new array.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTrimExcess
Sets the capacity to the actual number of elements in the PriorityQueueT, if that number is less than a threshold value.
Top
Extension Methods
Remarks

The items must be immutable as long as they are in the PriorityQueueT. The only exception is the first item, which you may modify if you call AdjustFirstItem immediately afterward.

Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also