| PriorityQueueT Constructor (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.
Namespace:
Ookii.Collections.Generic
Assembly:
Ookii.Collections.Generic (in Ookii.Collections.Generic.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public PriorityQueue(
IComparer<T> comparer
)
Public Sub New (
comparer As IComparer(Of T)
)
public:
PriorityQueue(
IComparer<T>^ comparer
)
new :
comparer : IComparer<'T> -> PriorityQueue
Parameters
- comparer
- Type: System.Collections.GenericIComparerT
The IComparerT implementation to use when
comparing elements, or to use the default ComparerT
for the type of element.
Remarks PriorityQueueT requires a comparer implementation to perform key
comparisons. If comparer is , this constructor uses the default
generic equality comparer, Default. If type T
implements the IComparableT generic interface, the default comparer
uses that implementation.
This constructor is an O(1) operation.
See Also