Template Class BucketQueue
Defined in File BucketQueue.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T, std::integral K = int>
class BucketQueue a two-level bucket queue: least f first, then largest g, then LIFO
Public Types
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using iterator = const_iterator
Public Functions
-
const T &top(void)
an item of least f and, among those, of largest g, the last pushed
- Pre:
the queue is not empty
-
Entry popEntry(void)
removes top() and returns it with its keys f and g, finding the top once instead of three times through topF(), topG() and pop()
- Pre:
the queue is not empty
-
bool empty(void) const
-
std::size_t size(void) const
the number of items, the stale ones included
-
void clear(void)
removes all the items and frees the layers
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
class const_iterator
Public Types
-
using iterator_category = std::forward_iterator_tag
-
using difference_type = std::ptrdiff_t
Public Functions
-
const_iterator(void) = default
-
inline const_iterator(const BucketQueue *q, std::size_t f)
-
inline const_iterator &operator++(void)
-
inline const_iterator operator++(int)
-
inline bool operator==(const const_iterator &o) const
-
using iterator_category = std::forward_iterator_tag
-
struct Entry
an item with its keys
-
using size_type = std::size_t