Constructor RandomAccessPriorityQueue
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Gamelogic.Extensions.dll
RandomAccessPriorityQueue(int, IComparer<TPriority>)
Initializes a new instance of the RandomAccessPriorityQueue<TElement, TPriority> class with a specified capacity and comparer.
public RandomAccessPriorityQueue(int capacity, IComparer<TPriority> comparer)
Parameters
capacityintThe maximum number of elements the priority queue can hold.
comparerIComparer<TPriority>The comparer used to determine the priority of elements.
Exceptions
- ArgumentNullException
compareris null.- ArgumentOutOfRangeException
capacityis negative.