#include <MaxPriorityQueue.hh>
Inheritance diagram for MaxPriorityQueue< T >:
Public Methods | |
MaxPriorityQueue (T init) | |
MaxPriorityQueue (T init, int) | |
void | insertKeyInQueue (T) |
void | printQueue () |
bool | emptyQueue () |
void | setQueueValue (int) |
T | extractRoot () |
void | deleteKey (int key) |
void | changeKey (int key,T newValue) |
|
Constructor which is calling constructor HeapMax<T>::HeapMax(T init)
|
|
Constructor which calls constructor HeapMax<T>::HeapMax(T init,int _value)
|
|
Method to change the value of a member key to newValue. First there runs an area check whether the chosen key is in the admissable area or not. If the check is negative there will be the answer: "The chosen key is out of the admissable area" and there will be nothing more done.If the check is positive the value of the declared key will be changed to newValue and the heap condition will be reestablished.
|
|
Method to delete a member key of the heap. First there runs an area check whether the chosen key is in the admissable area or not. If the check is negative there will be the answer: "The chosen key is out of the admissable area" and there will be nothing more done. If the check is positive the key will be deleted and the heap condition will be reestablished.
|
|
Method to check whether the queue is empty or not by calling HeapMax<T>::emptyHeap().
|
|
This method extracts the root of the heap.
|
|
Method to insert a new key value by calling HeapMax<T>::insertKey(T _value).
|
|
Method to print the queue by calling void HeapMax<T>::printHeap(). |
|
With this method you are able to re-set the variable m_value of HeapMax<T> by calling void HeapMax<T>::setValue(int _value) which is responsible for the size of the field allocation (ref. void HeapMax<T>::setValue(int _value)).
|