Satsuma
a delicious .NET graph library
|
Interface to a read-only priority queue. More...
Public Member Functions | |
bool | Contains (TElement element) |
Returns whether the specified element is in the priority queue. More... | |
TElement | Peek () |
Returns the most prioritized element (that is, which has the lowest priority). More... | |
TElement | Peek (out TPriority priority) |
Returns the most prioritized element (that is, which has the lowest priority) and its priority. More... | |
bool | TryGetPriority (TElement element, out TPriority priority) |
Gets the priority of an element without throwing an exception. More... | |
Properties | |
int | Count [get] |
The count of elements currently in the queue. More... | |
IEnumerable< KeyValuePair < TElement, TPriority > > | Items [get] |
Returns all the element-priority pairs. More... | |
Interface to a read-only priority queue.
Elements with lower priorities are prioritized more.
Definition at line 32 of file PriorityQueue.cs.
bool Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.Contains | ( | TElement | element | ) |
Returns whether the specified element is in the priority queue.
Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
TElement Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.Peek | ( | ) |
Returns the most prioritized element (that is, which has the lowest priority).
Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
TElement Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.Peek | ( | out TPriority | priority | ) |
Returns the most prioritized element (that is, which has the lowest priority) and its priority.
Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
bool Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.TryGetPriority | ( | TElement | element, |
out TPriority | priority | ||
) |
Gets the priority of an element without throwing an exception.
priority | Becomes default(P) if the element is not in the queue, and the priority of the element otherwise. |
true
if the specified element is in the priority queue. Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
|
get |
The count of elements currently in the queue.
Definition at line 35 of file PriorityQueue.cs.
|
get |
Returns all the element-priority pairs.
Definition at line 37 of file PriorityQueue.cs.