A heap class. More...
Public Member Functions | |
| Heap (int size) | |
| Initialise the heap to contain size items. | |
| void | insert (T &element) |
| Insert an item into the heap. | |
| void | replaceMin (T &element) |
| Replace the minimum heap item with 'element'. | |
| void | removeMin (T &element) |
| Remove the minimum item from the heap. | |
| T & | showMin (void) |
| Return the minimum heap item. | |
| bool | empty (void) |
| Return true if the heap is empty. | |
| int | Size (void) |
| Return the size of the heap (the maximum number of items that can be stored). | |
| bool | lessThanHeap (T &element) |
| Return true if the element is less than the minumum heap value. | |
A heap class.
This class is a heap used to efficiently store and retieve data in an ordered fashion.
1.6.1