MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
Public Member Functions
MCScheduling.GeneticAlgorithm.CPriorityQueue< T > Class Template Reference

A priority queue implementation based on a binary heap structure, which guarantees that all the operations define has logarithmic time complexity. More...

List of all members.

Public Member Functions

 CPriorityQueue (IComparer< T > comparer)
 Creates a new priority queue with initial capacity of 64 elements.
 CPriorityQueue (IComparer< T > comparer, int initialCapacity, bool fixedLength)
 Creates a new priority queue with the specified initial capacity, which is used only for performace reasons.
void push (T element)
 Inserts the specified element into the queue.
pop ()
 Returns an element with the maximum key value, and removes it from the queue.
peek ()
 Returns an element with the maximum key value, contrary to the pop method, the element is not removed from the queue.
int length ()
 Returns the length of the queue, i.e.
ReadOnlyCollection< T > elements ()
 Returns read-only list of the elements in the queue.

Detailed Description

template<T>
class MCScheduling::GeneticAlgorithm::CPriorityQueue< T >

A priority queue implementation based on a binary heap structure, which guarantees that all the operations define has logarithmic time complexity.

Author:
Tomas Tunys

Member Function Documentation

template<T >
MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.CPriorityQueue ( IComparer< T >  comparer)

Creates a new priority queue with initial capacity of 64 elements.

Parameters:
comparerThe comparer used to determine the ordering of the elements within the queue.
template<T >
MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.CPriorityQueue ( IComparer< T >  comparer,
int  initialCapacity,
bool  fixedLength 
)

Creates a new priority queue with the specified initial capacity, which is used only for performace reasons.

Parameters:
initialCapacityThe initial capacity of the queue.
comparerThe comparer used to determine the ordering of the elements within the queue.
fixedLengthIf true, the queue will have fixed length given by initialCapacity.
template<T >
ReadOnlyCollection<T> MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.elements ( )

Returns read-only list of the elements in the queue.

Returns:
A read-only list of elements in the queue.
template<T >
int MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.length ( )

Returns the length of the queue, i.e.

the number of elemnts in the queue.

Returns:
The number of elements in the queue.
template<T >
T MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.peek ( )

Returns an element with the maximum key value, contrary to the pop method, the element is not removed from the queue.

Returns:
An element with the greatest key value.
Exceptions:
InvalidOperationExceptionIf the queue is empty, and there is no element to return.
template<T >
T MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.pop ( )

Returns an element with the maximum key value, and removes it from the queue.

Returns:
An element with the greatest key value.
Exceptions:
InvalidOperationExceptionIf the queue is empty, and there is no element to return.
template<T >
void MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.push ( element)

Inserts the specified element into the queue.

This increases the size of the queue by .

Parameters:
elementThe element to be inserted into the queue.
 All Classes Namespaces Functions Variables Properties