Max

template<typename Value, typename KeyExtractor = ValueExtractor, typename Comp = MaxComparator>
struct Max

Max mixin adds support for finding the maximum value in a B++ tree in O(log N) time You can find just the max value using the max() method or get an iterator pointing to the max element with max_element() You can also find the max value/element in a subrange of the tree with max(it1, it2) or max_element(it1, it2)

Template Parameters:
  • Value – the value type of the B++ tree

  • KeyExtractor – a class which implements operator()(Value) to return the field within the value type that is used for determining the max

  • Comp – a class which implements operator()(A const& a, B const& b) to return true if a > b and false otherwise

Public Types

template<typename Parent>
using LeafNode = typename Detail::template LeafNode<Parent>
template<typename Parent, auto internal_size>
using InternalNode = typename Detail::template InternalNode<Parent, internal_size>
template<typename Parent>
using NodeInfo = typename Detail::template NodeInfo<Parent>
template<typename Parent>
using Transient = typename Detail::template Transient<Parent>
template<typename Parent>
using Persistent = typename Detail::template Persistent<Parent>

Public Static Functions

static inline constexpr size_t sizeof_hint()
template<typename Parent>
struct Shared : public Parent

Public Types

using iterator = typename Parent::iterator
using const_iterator = typename Parent::const_iterator

Public Functions

template<typename ...Us>
inline explicit Shared(Us&&... us)
KeyRef max() const
template<typename It>
KeyRef max(It const &begin, It const &end) const
iterator max_element()
template<typename It>
iterator max_element(It const &begin, It const &end)
const_iterator max_element_const() const
template<typename It>
const_iterator max_element_const(It const &begin, It const &end) const
const_iterator max_element() const
template<typename It>
const_iterator max_element(It const &begin, It const &end) const