Template Class ListPriorityQueue
Defined in File ListPriorityQueue.h
Class Documentation
-
template<class T, std::totally_ordered P = int, bool Sorted = true>
class ListPriorityQueue a priority queue on a list, sorted by priority or not
Public Types
-
using value_type = Pair
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using reference = const Pair&
-
using const_reference = const Pair&
Public Functions
-
bool empty(void) const
-
int size(void) const
-
T deleteMin(void)
O( 1 ) if sorted, O( n ) otherwise.
- Pre:
the queue is not empty
- Post:
one item less, none of smaller priority than the one removed
-
void decrease(Handle &y, const P &p)
O( n ) if sorted, O( 1 ) otherwise; the handle stays valid.
- Pre:
y is an item of this queue and p is not larger than its priority
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
using value_type = Pair