Template Class SequenceHeap

Nested Relationships

Nested Types

Class Documentation

template<class T, class Better = std::less<T>>
class SequenceHeap

the sequence heap of plain items, the best one by better() on top

Public Types

using Item = T

the type of the items

Public Functions

inline explicit SequenceHeap(Better better = Better())
void push(const T &x)

pushes x, O( log n ) amortized

const T &top(void)

the best item

Pre:

the heap is not empty

T pop(void)

removes the best item and returns it, O( log n ) amortized

Pre:

the heap is not empty

inline bool empty(void) const
inline std::size_t size(void) const
void clear(void)

Public Static Attributes

static constexpr std::size_t M = 4096

the items of the insertion heap and of a buffer

static constexpr std::size_t K = 16

the sequences of a group