Satsuma
a delicious .NET graph library
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Properties | List of all members
Satsuma.IReadOnlyPriorityQueue< TElement, TPriority > Interface Template Reference

Interface to a read-only priority queue. More...

Inheritance diagram for Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >:
Satsuma.IPriorityQueue< TElement, TPriority > Satsuma.PriorityQueue< TElement, TPriority >

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...
 

Detailed Description

Interface to a read-only priority queue.

Elements with lower priorities are prioritized more.

Definition at line 32 of file PriorityQueue.cs.

Member Function Documentation

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.

Parameters
priorityBecomes default(P) if the element is not in the queue, and the priority of the element otherwise.
Returns
true if the specified element is in the priority queue.

Implemented in Satsuma.PriorityQueue< TElement, TPriority >.

Property Documentation

int Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.Count
get

The count of elements currently in the queue.

Definition at line 35 of file PriorityQueue.cs.

IEnumerable<KeyValuePair<TElement, TPriority> > Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.Items
get

Returns all the element-priority pairs.

Definition at line 37 of file PriorityQueue.cs.


The documentation for this interface was generated from the following file: