time if
elements are stored in the priority queue.
More...
#include <bprioqueue.h>
Inheritance diagram for ABA_BPRIOQUEUE< Type, Key >:

Public Member Functions | |
| ABA_BPRIOQUEUE (ABA_GLOBAL *glob, int size) | |
| void | insert (Type elem, Key key) |
| int | getMin (Type &min) const |
| int | getMinKey (Key &minKey) const |
| int | extractMin (Type &min) |
| Extends the function getMin(min) in the way that the minimal element is also removed from the priority queue. | |
| void | clear () |
| int | size () const |
| int | number () const |
| void | realloc (int newSize) |
Private Attributes | |
| ABA_GLOBAL * | glob_ |
| ABA_BHEAP< Type, Key > | heap_ |
time if
elements are stored in the priority queue.
Definition at line 57 of file bprioqueue.h.
| ABA_BPRIOQUEUE< Type, Key >::ABA_BPRIOQUEUE | ( | ABA_GLOBAL * | glob, | |
| int | size | |||
| ) |
The constructor of an empty priority queue.
| glob | A pointer to the corresponding object. | |
| size | The maximal number of elements the priority queue can hold without reallocation. |
| void ABA_BPRIOQUEUE< Type, Key >::insert | ( | Type | elem, | |
| Key | key | |||
| ) |
Inserts an element in the priority queue.
| elem | The element being inserted. | |
| key | The key of the element. |
| int ABA_BPRIOQUEUE< Type, Key >::getMin | ( | Type & | min | ) | const |
Retrieves the element with minimal key from the priority queue.
1 otherwise.
| min | If the priority queue is non-empty the minimal element is assigned to min. |
| int ABA_BPRIOQUEUE< Type, Key >::getMinKey | ( | Key & | minKey | ) | const |
Retrieves the key of the minimal element in the priority queue.
1 otherwise.
| minKey | Holds after the call the key of the minimal element in the priority queue, if the queue is non-emtpy. |
| int ABA_BPRIOQUEUE< Type, Key >::extractMin | ( | Type & | min | ) |
Extends the function getMin(min) in the way that the minimal element is also removed from the priority queue.
1 otherwise.
| min | If the priority queue is non-empty the minimal element is assigned to min. |
| void ABA_BPRIOQUEUE< Type, Key >::clear | ( | ) |
Makes the priority queue empty.
| int ABA_BPRIOQUEUE< Type, Key >::size | ( | ) | const |
| int ABA_BPRIOQUEUE< Type, Key >::number | ( | ) | const |
| void ABA_BPRIOQUEUE< Type, Key >::realloc | ( | int | newSize | ) |
Increases the size of the priority queue.
It is not allowed to decrease the size of the priority queue. In this case an error message is output and the program stops.
| newSize | The new size of the priority queue. |
ABA_GLOBAL* ABA_BPRIOQUEUE< Type, Key >::glob_ [private] |
A pointer to the corresponding global object.
Definition at line 131 of file bprioqueue.h.
ABA_BHEAP<Type, Key> ABA_BPRIOQUEUE< Type, Key >::heap_ [private] |
The heap implementing the priority queue.
Definition at line 135 of file bprioqueue.h.
1.5.1