Click or drag to resize

PriorityQueueT(IEnumerableT) Constructor

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.

Namespace: Ookii.Jumbo
Assembly: Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 0.3.0+dc1307f20e065bb638e0b73a34cd216f57e486f1
Syntax
public PriorityQueue(
	IEnumerable<T> collection
)

Parameters

collection  IEnumerableT
The IEnumerableT whose elements are copied into the PriorityQueueT.
Exceptions
ExceptionCondition
ArgumentNullExceptioncollection is .
Remarks

PriorityQueueT requires a comparer implementation to perform key comparisons. This constructor uses the default generic equality comparer, Default. If type T implements the IComparableT generic interface, the default comparer uses that implementation. Alternatively, you can specify an implementation of the IComparerT generic interface by using a constructor that accepts a comparer parameter.

This constructor is an O(n) operation, where n is the number of elements in collection.

See Also