Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
bprioqueue.h
Go to the documentation of this file.
1
31#pragma once
32
34
35namespace abacus {
36
38
56template<class Type, class Key>
57class AbaPrioQueue : public AbacusRoot {
58public:
59
61
66
68
72 void insert(Type elem, Key key);
73
75
81 int getMin(Type &min) const;
82
84
90 int getMinKey(Key &minKey) const;
91
93
99 int extractMin(Type &min);
100
102 void clear();
103
105 int size() const;
106
108 int number() const;
109
111
117 void realloc(int newSize);
118
119private:
120
123};
124
125}
126
Binary heaps.
Definition bheap.h:72
Bounded priority queues.
Definition bprioqueue.h:57
int number() const
Returns the number of elements stored in the priority queue.
int getMinKey(Key &minKey) const
Retrieves the key of the minimal element in the priority queue.
AbaPrioQueue(int size)
The constructor of an empty priority queue.
void realloc(int newSize)
Increases the size of the priority queue.
int extractMin(Type &min)
Retrieves and removes the minimal element from the priority queue.
void insert(Type elem, Key key)
Inserts an element in the priority queue.
int getMin(Type &min) const
Retrieves the element with minimal key from the priority queue.
int size() const
Returns the maximal number of elements which can be stored in the priority queue.
AbaBHeap< Type, Key > heap_
The heap implementing the priority queue.
Definition bprioqueue.h:122
void clear()
Makes the priority queue empty.
Base class of all other classes of ABACUS.
Definition abacusroot.h:68
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()