|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
47 template<
typename IMPL,
typename H,
typename T,
typename C>
72 virtual const T&
top()
const = 0;
85 virtual void pop() = 0;
101 virtual const T&
value(
const Handle handle)
const = 0;
110 virtual void merge(IMPL& other);
113 template<
typename IMPL,
typename H,
typename T,
typename C>
115 throw std::runtime_error(
"Merging two binary heaps is not supported");
The namespace for all OGDF objects.
virtual const C & comparator() const
Returns the comparator used to sort the values in the heap.
Common interface for all heap classes.
HeapBase(const C &comp=C())
virtual const T & value(const Handle handle) const =0
Returns the value of that handle.
virtual const T & top() const =0
Returns the topmost value in the heap.
virtual void decrease(Handle handle, const T &value)=0
Decreases a single value.
virtual void merge(IMPL &other)
Merges in values of other heap.
H * Handle
The type of handle used to identify stored values.
virtual void pop()=0
Removes the topmost value from the heap.
virtual Handle push(const T &value)=0
Inserts a value into the heap.