MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
|
A priority queue implementation based on a binary heap structure, which guarantees that all the operations define has logarithmic time complexity. More...
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. | |
T | pop () |
Returns an element with the maximum key value, and removes it from the queue. | |
T | 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. |
A priority queue implementation based on a binary heap structure, which guarantees that all the operations define has logarithmic time complexity.
MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.CPriorityQueue | ( | IComparer< T > | comparer | ) |
Creates a new priority queue with initial capacity of 64 elements.
comparer | The comparer used to determine the ordering of the elements within the queue. |
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.
initialCapacity | The initial capacity of the queue. |
comparer | The comparer used to determine the ordering of the elements within the queue. |
fixedLength | If true, the queue will have fixed length given by initialCapacity. |
ReadOnlyCollection<T> MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.elements | ( | ) |
Returns read-only list of the elements in the queue.
int MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.length | ( | ) |
Returns the length of the queue, i.e.
the number of elemnts in the queue.
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.
InvalidOperationException | If the queue is empty, and there is no element to return. |
T MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.pop | ( | ) |
Returns an element with the maximum key value, and removes it from the queue.
InvalidOperationException | If the queue is empty, and there is no element to return. |
void MCScheduling.GeneticAlgorithm.CPriorityQueue< T >.push | ( | T | element | ) |
Inserts the specified element into the queue.
This increases the size of the queue by .
element | The element to be inserted into the queue. |