Apache REEF  0.16.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

◆ PriorityQueue()

Member Function Documentation

◆ Add()

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

◆ Clear()

Clears the priority queue.

◆ Contains()

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

Checks if the list contains an item.

◆ CopyTo()

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.

◆ Dequeue()

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

◆ Enqueue()

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

Adds an element to the priority queue.

◆ GetEnumerator()

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.

◆ Peek()

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

◆ Remove()

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

Remove is not supported.

Exceptions
NotSupportedExceptionOperation not supported

Property Documentation

◆ Count

Returns the count of the priority queue.

◆ IsReadOnly

Always returns false.


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