Template Class LinkedHeapPriorityQueue
Defined in File LinkedHeapPriorityQueue.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T, std::totally_ordered P = int, bool L = false>
class LinkedHeapPriorityQueue a priority queue on a heap with pointers
Public Types
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using reference = value_type
-
using const_reference = value_type
-
using const_iterator = PathIterator<LinkedHeapPriorityQueue, Shape>
-
using iterator = const_iterator
Public Functions
-
LinkedHeapPriorityQueue(void) = default
-
LinkedHeapPriorityQueue(const LinkedHeapPriorityQueue&) = delete
-
LinkedHeapPriorityQueue &operator=(const LinkedHeapPriorityQueue&) = delete
-
LinkedHeapPriorityQueue(LinkedHeapPriorityQueue &&other) noexcept
the items of other, which is left empty
-
LinkedHeapPriorityQueue &operator=(LinkedHeapPriorityQueue &&other) noexcept
-
~LinkedHeapPriorityQueue()
-
bool empty(void) const
-
int size(void) const
-
void insert(const T &x, const P &p)
a new last leaf, moved up while smaller than its parent
- Post:
one item more
-
T deleteMin(void)
the last leaf into the root, moved down while larger than a child
- Pre:
the queue is not empty
- Post:
one item less, none of smaller priority than the one removed
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
struct Shape
the shape of the tree, for PathIterator
-
using size_type = std::size_t