25 #ifndef MPBLOCKS_RED_BLACK_TREE_H_
26 #define MPBLOCKS_RED_BLACK_TREE_H_
35 template <
class Traits>
78 else if (x ==
left(
p(x)))
131 if (z ==
left(
p(z))) {
172 if (x ==
left(
p(x))) {
254 while (y !=
Nil && x ==
left(y)) {
279 else if (y ==
left(
p(y)))
299 #endif // MPBLOCKS_RED_BLACK_TREE_H_
void insertFixup(NodeRef z)
NodeRef treePredecessor(NodeRef x)
CLRS 12.2 page 259.
void swapKey(NodeRef a, NodeRef b)
void removeFixup(NodeRef x)
auto key(NodeRef N) -> decltype(m_ops.key(N))
NodeRef treeSuccessor(NodeRef x)
CLRS 12.2 page 259.
NodeRef treeMinimum(NodeRef x)
CLRS 12.2 page 258.
void leftRotate(NodeRef x)
Iterator< Traits > begin()
NodeRef & left(NodeRef N)
NodeRef treeMaximum(NodeRef x)
CLRS 12.2 page 258.
implements red black trees from CLRS
NodeRef & right(NodeRef N)
void rightRotate(NodeRef x)