Template Class DaryHeap
Defined in File DaryHeap.h
Class Documentation
-
template<class T, class Better = std::less<T>, unsigned D = 4, bool BottomUp = false>
class DaryHeap a D-ary heap of plain items, the best one by better() on top; pop() by the walk down from the top, or from the bottom up if BottomUp
Public Functions
-
T pop(void)
removes the best item and returns it, the last item moved down from the root
- Pre:
the heap is not empty
-
bool empty(void) const
-
std::size_t size(void) const
-
void reserve(std::size_t n)
room for n items, so that the pushes up to n do not reallocate
-
void clear(void)
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
T pop(void)