AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
HoloToolkit.Unity.PriorityQueue< TPriority, TValue > Class Template Reference

Min-heap priority queue. In other words, lower priorities will be removed from the queue first. See http://en.wikipedia.org/wiki/Binary_heap for more info. More...

Inheritance diagram for HoloToolkit.Unity.PriorityQueue< TPriority, TValue >:

Classes

class  ValueCollection
 

Public Member Functions

 PriorityQueue ()
 
 PriorityQueue (IComparer< TPriority > comparer)
 
IEnumerator< KeyValuePair< TPriority, TValue > > GetEnumerator ()
 
void Clear ()
 Clears the priority queue More...
 
void Push (TPriority priority, TValue value)
 Add an element to the priority queue. More...
 
KeyValuePair< TPriority, TValue > Pop ()
 Pop the minimal element of the queue. Will fail at runtime if queue is empty. More...
 
bool Contains (TValue value)
 Returns whether or not the value is contained in the queue More...
 
bool Remove (TValue value)
 Removes the first element that equals the value from the queue More...
 
bool RemoveAtPriority (TPriority priority, Predicate< TValue > shouldRemove)
 Removes all elements with this priority from the queue. More...
 

Properties

ValueCollection Values [get]
 
int Count [get]
 Number of elements in priority queue More...
 
KeyValuePair< TPriority, TValue > Top [get]
 Get the element with the minimum priority in the queue. The Key in the return value is the priority. More...
 

Detailed Description

Min-heap priority queue. In other words, lower priorities will be removed from the queue first. See http://en.wikipedia.org/wiki/Binary_heap for more info.

Template Parameters
TPriorityType for the priority used for ordering.
TValueType of values in the queue.

Definition at line 17 of file PriorityQueue.cs.

Constructor & Destructor Documentation

§ PriorityQueue() [1/2]

Definition at line 48 of file PriorityQueue.cs.

§ PriorityQueue() [2/2]

HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.PriorityQueue ( IComparer< TPriority >  comparer)

Definition at line 50 of file PriorityQueue.cs.

Member Function Documentation

§ Clear()

void HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.Clear ( )

Clears the priority queue

Definition at line 93 of file PriorityQueue.cs.

§ Contains()

bool HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.Contains ( TValue  value)

Returns whether or not the value is contained in the queue

Definition at line 147 of file PriorityQueue.cs.

§ GetEnumerator()

IEnumerator<KeyValuePair<TPriority, TValue> > HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.GetEnumerator ( )

Definition at line 78 of file PriorityQueue.cs.

§ Pop()

KeyValuePair<TPriority, TValue> HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.Pop ( )

Pop the minimal element of the queue. Will fail at runtime if queue is empty.

Returns
The minimal element

Definition at line 135 of file PriorityQueue.cs.

§ Push()

void HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.Push ( TPriority  priority,
TValue  value 
)

Add an element to the priority queue.

Parameters
priorityPriority of the element
value

Definition at line 103 of file PriorityQueue.cs.

§ Remove()

bool HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.Remove ( TValue  value)

Removes the first element that equals the value from the queue

Definition at line 155 of file PriorityQueue.cs.

§ RemoveAtPriority()

bool HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.RemoveAtPriority ( TPriority  priority,
Predicate< TValue >  shouldRemove 
)

Removes all elements with this priority from the queue.

Returns
True if elements were removed

Definition at line 174 of file PriorityQueue.cs.

Property Documentation

§ Count

int HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.Count
get

Number of elements in priority queue

Definition at line 113 of file PriorityQueue.cs.

§ Top

KeyValuePair<TPriority, TValue> HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.Top
get

Get the element with the minimum priority in the queue. The Key in the return value is the priority.

Definition at line 124 of file PriorityQueue.cs.

§ Values

ValueCollection HoloToolkit.Unity.PriorityQueue< TPriority, TValue >.Values
get

Definition at line 64 of file PriorityQueue.cs.


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