Class PriorityQueueExtensions
- Namespace
- AlgorithmsSW.PriorityQueue
- Assembly
- AlgorithmsSW.dll
public static class PriorityQueueExtensions
- Inheritance
-
PriorityQueueExtensions
- Inherited Members
Methods
IsEmpty<T>(IPriorityQueue<T>)
public static bool IsEmpty<T>(this IPriorityQueue<T> queue)
Parameters
queue
IPriorityQueue<T>
Returns
Type Parameters
T
IsSingleton<T>(IPriorityQueue<T>)
public static bool IsSingleton<T>(this IPriorityQueue<T> queue)
Parameters
queue
IPriorityQueue<T>
Returns
Type Parameters
T
ToSortedArray<T>(IPriorityQueue<T>)
Converts the queue to an array, sorted by priority.
public static T[] ToSortedArray<T>(this IPriorityQueue<T> queue)
Parameters
queue
IPriorityQueue<T>The queue to convert.
Returns
- T[]
An array containing the elements in the queue, sorted by priority.
Type Parameters
T
The type of the elements in the queue.
ToSortedList<T>(IPriorityQueue<T>)
Converts the queue to a list, sorted by priority.
public static IRandomAccessList<T> ToSortedList<T>(this IPriorityQueue<T> queue)
Parameters
queue
IPriorityQueue<T>The queue to convert.
Returns
- IRandomAccessList<T>
An array containing the elements in the queue, sorted by priority.
Type Parameters
T
The type of the elements in the queue.