25 #ifndef MPBLOCKS_RED_BLACK_ITERATOR_H_
26 #define MPBLOCKS_RED_BLACK_ITERATOR_H_
33 template<
class Traits >
37 template <
class Traits>
Iterator< Traits > & operator++()
increment operator
NodeRef treePredecessor(NodeRef x)
CLRS 12.2 page 259.
bool operator!=(const Iterator &other)
comparison for range-based
Iterator(Tree_t *tree, NodeRef node)
auto operator*() -> decltype(tree->key(node))
dereference to whatever key returns
auto key(NodeRef N) -> decltype(m_ops.key(N))
NodeRef treeSuccessor(NodeRef x)
CLRS 12.2 page 259.
Iterator< Traits > & operator--()
decrement operator
implements red black trees from CLRS
BinaryKey other(const BinaryKey &key)
implements red black trees from CLRS