49template<
typename IMPL,
typename H,
typename T,
typename C>
74 virtual const T&
top()
const = 0;
87 virtual void pop() = 0;
115template<
typename IMPL,
typename H,
typename T,
typename C>
117 throw std::runtime_error(
"Merging two binary heaps is not supported");
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.
HeapBase(const C &comp=C())
virtual Handle push(const T &value)=0
Inserts a value into the heap.
virtual const T & top() const =0
Returns the topmost value in the heap.
virtual const T & value(const Handle handle) const =0
Returns the value of that handle.
H * Handle
The type of handle used to identify stored values.
virtual const C & comparator() const
Returns the comparator used to sort the values in the heap.
virtual void decrease(Handle handle, const T &value)=0
Decreases a single value.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.