|
| HeapBase (const C &comp=C()) |
|
virtual const C & | comparator () const |
| Returns the comparator used to sort the values in the heap. More...
|
|
virtual void | decrease (Handle handle, const T &value)=0 |
| Decreases a single value. More...
|
|
virtual void | merge (IMPL &other) |
| Merges in values of other heap. More...
|
|
virtual void | pop ()=0 |
| Removes the topmost value from the heap. More...
|
|
virtual Handle | push (const T &value)=0 |
| Inserts a value into the heap. More...
|
|
virtual const T & | top () const =0 |
| Returns the topmost value in the heap. More...
|
|
virtual const T & | value (const Handle handle) const =0 |
| Returns the value of that handle. More...
|
|
template<typename IMPL, typename H, typename T, typename C>
class ogdf::HeapBase< IMPL, H, T, C >
Common interface for all heap classes.
- Template Parameters
-
IMPL | The type of heap. |
H | The type of handle to use. Such a handle will be given to the user for each pushed value. |
T | The type of values to be stored. |
C | The comparator used to order the stored values. |
Definition at line 48 of file HeapBase.h.
template<typename IMPL , typename H , typename T , typename C >
The type of handle used to identify stored values.
The handle type accessible from outside of the heap will always be a pointer.
Definition at line 56 of file HeapBase.h.
template<typename IMPL , typename H , typename T , typename C >
Merges in values of other
heap.
After merge other
heap becomes empty and is valid for further usage.
- Parameters
-
other | A heap to be merged in. |
Reimplemented in ogdf::PairingHeap< T, C >.
Definition at line 114 of file HeapBase.h.
template<typename IMPL , typename H , typename T , typename C >