This project has retired. For details please refer to its Attic page.
Apache REEF: Org.Apache.REEF.Utilities.Collections.PriorityQueue< T > Class Template Reference
Apache REEF  0.15.0
Retainable Evaluator Execution Framework
Public Member Functions | Properties | List of all members
Org.Apache.REEF.Utilities.Collections.PriorityQueue< T > Class Template Reference

A simple priority queue implementation, where the head of the queue is the smallest element in the priority queue. More...

Inherits ICollection< T >.

Public Member Functions

 PriorityQueue ()
 
IEnumerator< T > GetEnumerator ()
 Gets the enumerator of the priority queue. More...
 
Peek ()
 Peeks at the head of the priority queue, but does not remove the element at the head. More...
 
void Enqueue (T item)
 Adds an element to the priority queue. More...
 
Dequeue ()
 Dequeues an item from the priority queue. More...
 
void Add (T item)
 Enqueue. More...
 
void Clear ()
 Clears the priority queue. More...
 
bool Contains (T item)
 Checks if the list contains an item. More...
 
void CopyTo (T[] array, int arrayIndex)
 Copies the priority queue to a compatible array, starting at the array's provided index. More...
 
bool Remove (T item)
 Remove is not supported. More...
 

Properties

int Count [get]
 Returns the count of the priority queue. More...
 
bool IsReadOnly [get]
 Always returns false. More...
 

Detailed Description

A simple priority queue implementation, where the head of the queue is the smallest element in the priority queue.

Type Constraints
T :IComparable<T> 

Constructor & Destructor Documentation

Member Function Documentation

void Org.Apache.REEF.Utilities.Collections.PriorityQueue< T >.Add ( item)
inline

Clears the priority queue.

bool Org.Apache.REEF.Utilities.Collections.PriorityQueue< T >.Contains ( item)
inline

Checks if the list contains an item.

void Org.Apache.REEF.Utilities.Collections.PriorityQueue< T >.CopyTo ( T[]  array,
int  arrayIndex 
)
inline

Copies the priority queue to a compatible array, starting at the array's provided index.

Dequeues an item from the priority queue.

Removes the head of the priority queue, which is the smallest element in the priority queue.

Exceptions
InvalidOperationExceptionThrown when the priority queue is empty
void Org.Apache.REEF.Utilities.Collections.PriorityQueue< T >.Enqueue ( item)
inline

Adds an element to the priority queue.

IEnumerator<T> Org.Apache.REEF.Utilities.Collections.PriorityQueue< T >.GetEnumerator ( )
inline

Gets the enumerator of the priority queue.

The Enumerator returns elements in no guaranteed order.

Peeks at the head of the priority queue, but does not remove the element at the head.

Exceptions
InvalidOperationExceptionThrown when the priority queue is empty
bool Org.Apache.REEF.Utilities.Collections.PriorityQueue< T >.Remove ( item)
inline

Remove is not supported.

Exceptions
NotSupportedExceptionOperation not supported

Property Documentation

Returns the count of the priority queue.

Always returns false.


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