|
Public Member Functions |
| heap2 () |
| ~heap2 () |
void | reset () |
| Remove all objects from queue.
|
void | add (OBJ val) |
| Add object into heap2.
|
void | decreaseKey (OBJ val) |
| Indicate that the key for a particular object has decreased.
|
bool | isIn (OBJ val) |
| Returns true if the object is in the heap2.
|
OBJ | remove () |
| Remove the item with the lowest key from the heap2 & re-heapify.
|
void | pop () |
OBJ | top () |
OBJ | find (OBJ val) |
| find this object in the heap and return
|
bool | empty () |
| Returns true if no items are in the heap2.
|
unsigned | size () |
heap2iterator | getIterator () const |
bool | iterNext (heap2iterator &it, OBJ &val) const |
Private Types |
typedef __gnu_cxx::hash_map<
OBJ, unsigned int, HashKey,
EqKey > | IndexTable |
Private Member Functions |
void | heapifyUp (unsigned int index) |
| Verify that the heap is internally consistent.
|
void | heapifyDown (unsigned int index) |
Private Attributes |
std::vector< OBJ > | _elts |
IndexTable | table |