68 explicit HeapBase(C
const &comp = C()) : m_comp(comp) {}
82 virtual const T &
top()
const = 0;
95 virtual void pop() = 0;
111 virtual const T &
value(
const Handle handle)
const = 0;
120 virtual void merge(IMPL &other);
132 throw std::runtime_error(
"Merging two binary heaps is not supported");
virtual const T & value(const Handle handle) const =0
Returns the value of that handle.
virtual void decrease(Handle handle, const T &value)=0
Decreases a single value.
virtual const C & comparator() const
Returns the comparator used to sort the values in the heap.
HeapBase(C const &comp=C())
Basic declarations, included by all source files.
Common interface for all heap classes.
virtual void merge(IMPL &other)
Merges in values of other heap.
virtual void pop()=0
Removes the topmost value from the heap.
The namespace for all OGDF objects.
virtual const T & top() const =0
Returns the topmost value in the heap.
virtual Handle push(const T &value)=0
Inserts a value into the heap.