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.IPriorityQueue< TElement, TPriority > Interface Template Reference

Interface to a priority queue which does not allow duplicate elements. More...

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

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

Detailed Description

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.

Member Function Documentation

void Satsuma.IClearable.Clear ( )
inherited
bool Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.Contains ( TElement  element)
inherited

Returns whether the specified element is in the priority queue.

Implemented in Satsuma.PriorityQueue< TElement, TPriority >.

TElement Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.Peek ( )
inherited

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

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

Returns
true if the given element was present in the queue.

Implemented in Satsuma.PriorityQueue< TElement, TPriority >.

bool Satsuma.IReadOnlyPriorityQueue< TElement, TPriority >.TryGetPriority ( TElement  element,
out TPriority  priority 
)
inherited

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
getinherited

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
getinherited

Returns all the element-priority pairs.

Definition at line 37 of file PriorityQueue.cs.

TPriority Satsuma.IPriorityQueue< TElement, TPriority >.this[TElement element]
getset

Gets or sets the priority of an element.

Definition at line 57 of file PriorityQueue.cs.


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