59template<
typename T,
class C = std::less<T>,
template<
typename,
class>
class Impl = PairingHeap>
72 using handle =
typename SpecImpl::Handle;
99 template<
class InputIt>
159 template<
class InputIt>
161 while (first != last) {
228namespace pq_internal {
231template<
typename T,
typename C>
245template<
typename E,
typename P>
262template<
typename E,
typename P,
class C,
template<
typename,
class>
class Impl>
266template<
typename E,
typename P,
class C,
template<
typename,
class>
class Impl>
294 Pair pair(element, priority);
301 Pair pair(this->
value(pos).element(), priority);
306template<
typename E,
typename P,
class C,
template<
typename,
class>
class Impl,
typename Map>
381template<
typename E,
typename P,
class C = std::less<P>,
template<
typename,
class>
class Impl =
PairingHeap>
405template<
typename E,
typename P,
class C = std::less<P>,
409 HashArray<E, typename PrioritizedQueue<E, P, C, Impl>::Handle, HashFunc<E>>> {
427template<
typename P,
class C,
template<
typename,
class>
class Impl,
template<
typename>
class HashFunc>
430 NodeArray<typename PrioritizedQueue<node, P, C, Impl>::Handle>> {
456template<
typename P,
class C,
template<
typename,
class>
class Impl,
template<
typename>
class HashFunc>
459 EdgeArray<typename PrioritizedQueue<edge, P, C, Impl>::Handle>> {
Declaration and implementation of EdgeArray class.
Declaration and implementation of HashArray class.
Declaration and implementation of NodeArray class.
Implementation of pairing heap data structure.
Dynamic arrays indexed with edges.
Class for the representation of edges.
Data type for general directed graphs (adjacency list representation).
Indexed arrays using hashing for element access.
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
Pairing heap implementation.
void clear()
Removes all elements from this queue.
PrioritizedMapQueue(const Graph &G, const C &cmp=C(), int initialSize=-1)
Creates a new queue with the given comparer.
typename PrioritizedQueue< edge, P, C, Impl >::Handle Handle
typename PrioritizedQueue< node, P, C, Impl >::Handle Handle
PrioritizedMapQueue(const Graph &G, const C &cmp=C(), int initialSize=-1)
Creates a new queue with the given comparer.
void clear()
Removes all elements from this queue.
Prioritized queue interface wrapper for heaps.
PrioritizedMapQueue(const C &cmp=C(), int initialSize=128)
Creates a new queue with the given comparer.
Priority queue interface wrapper for heaps.
void pop()
Removes the top element from the heap.
void push(std::initializer_list< value_type > ilist)
Inserts new elements specified by the given initializer list.
const value_type & const_reference
void push(InputIt first, InputIt last)
Inserts new elements specified by the given range.
PriorityQueue & operator=(PriorityQueue other)
Copy and move assignment.
void swap(PriorityQueue &other)
Swaps the contents.
const T & value(handle pos) const
Returns the priority of that handle.
typename SpecImpl::Handle handle
PriorityQueue(std::initializer_list< value_type > init, const C &cmp=C())
Creates priority queue with contents of the given initializer list.
PriorityQueue(PriorityQueue &&other)
Move constructor.
handle push(const value_type &value)
Inserts a new element with given value into the queue.
PriorityQueue(InputIt first, InputIt last, const C &cmp=C())
Creates priority queue with contents of the given range.
PriorityQueue & operator=(std::initializer_list< value_type > ilist)
Assigns the priority queue contents of the given initializer list.
~PriorityQueue()
Destroys the underlying data structure.
void merge(PriorityQueue &other)
Merges in enqueued values of other queue.
PriorityQueue(const PriorityQueue &other)
Copy constructor.
PriorityQueue(const C &cmp=C(), int initialSize=128)
Creates empty priority queue.
void decrease(handle pos, const T &value)
Decreases value of the element specified by handle to value.
size_type m_size
Number of entries.
void clear()
Removes all the entries from the queue.
friend void swap(PriorityQueue &a, PriorityQueue &b)
Swaps the contents.
SpecImpl * m_impl
Underlying heap data structure.
bool empty() const
Checks whether the queue is empty.
const T & top() const
Returns reference to the top element in the queue.
size_type size() const
Returns the number of enqueued elements.
Used to compare elements with assigned priorities.
bool operator()(const T &x, const T &y) const
Compare(const Compare &other)
Compare(const C &compare=C())
Pair for storing an element and a priority.
const P & priority() const
PairTemplate(const E &element, const P &priority)
const E & element() const
void decrease(const E &element, const P &priority)
Decreases the priority of the given element.
bool contains(const E &element) const
Returns whether this queue contains that key.
typename PrioritizedQueue< E, P, C, Impl >::Handle Handle
void pop()
Removes the topmost element from the queue.
void clear()
Removes all elements from this queue.
PrioritizedArrayQueueBase(const C &cmp, int initialSize, const Map &map)
void push(const E &element, const P &priority)
Adds a new element to the queue.
const P & priority(const E &element) const
Defines a queue for handling prioritized elements.
const E & topElement() const
Returns the topmost element in the queue.
const P & topPriority() const
Returns the priority of the topmost element in this queue.
Handle push(const E &element, const P &priority)
Pushes a new element with the respective priority to the queue.
typename SuperQueue::handle Handle
The type of handle for accessing the elements of this queue.
PrioritizedQueue(const C &cmp=C(), int initialSize=128)
void decrease(Handle pos, const P &priority)
EdgeElement * edge
The type of edges.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.