#include <MinPriorityQueue.hh>
Inheritance diagram for MinPriorityQueue< T >:
Public Methods | |
MinPriorityQueue (T init) | |
MinPriorityQueue (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 HeapMin<T>::HeapMin(T init)
|
|
Constructor which is calls constructor HeapMin<T>::HeapMin(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 HeapMin<T>::emptyHeap().
|
|
This method extracts the root of the heap.
|
|
Method to insert a new key value by calling HeapMin<T>::insertKey(T _value).
|
|
Method to print the queue by calling void HeapMin<T>::printHeap(). |
|
With this method you are able to re-set the variable m_value of HeapMin<T> by calling void HeapMin<T>::setValue(int _value) which is responsible for the size of the field allocation (ref. void HeapMin<T>::setValue(int _value)).
|