![]() |
Satsuma
a delicious .NET graph library
|
Interface to a priority queue which does not allow duplicate elements. More...
Public Member Functions | |
void | Clear () |
Reverts the object to its default state. More... | |
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 | Pop () |
Removes the most prioritized element from the queue, if it is not empty. More... | |
bool | Remove (TElement element) |
Removes a certain element from the queue, if present. 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... | |
TPriority | this[TElement element] [get, set] |
Gets or sets the priority of an element. More... | |
Interface to a priority queue which does not allow duplicate elements.
Elements with lower priorities are prioritized more.
Definition at line 53 of file PriorityQueue.cs.
|
inherited |
Reverts the object to its default state.
Implemented in Satsuma.IO.GraphML.DictionaryProperty< T >, Satsuma.NetworkSimplex, Satsuma.Path, Satsuma.Supergraph, Satsuma.DisjointSet< T >, Satsuma.PriorityQueue< TElement, TPriority >, Satsuma.MaximumMatching, and Satsuma.Matching.
|
inherited |
Returns whether the specified element is in the priority queue.
Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
|
inherited |
Returns the most prioritized element (that is, which has the lowest priority).
Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
|
inherited |
Returns the most prioritized element (that is, which has the lowest priority) and its priority.
Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
bool Satsuma.IPriorityQueue< TElement, TPriority >.Pop | ( | ) |
Removes the most prioritized element from the queue, if it is not empty.
true
if an element could be removed, i.e. the queue was not empty. Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
bool Satsuma.IPriorityQueue< TElement, TPriority >.Remove | ( | TElement | element | ) |
Removes a certain element from the queue, if present.
true
if the given element was present in the queue. Implemented in Satsuma.PriorityQueue< TElement, TPriority >.
|
inherited |
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 >.
|
getinherited |
The count of elements currently in the queue.
Definition at line 35 of file PriorityQueue.cs.
|
getinherited |
Returns all the element-priority pairs.
Definition at line 37 of file PriorityQueue.cs.
|
getset |
Gets or sets the priority of an element.
Definition at line 57 of file PriorityQueue.cs.