67 bool operator == (
Direction_e o)
const {
return d == o; }
68 bool operator != (
Direction_e o)
const {
return d != o; }
69 bool operator == (
Direction o)
const {
return d == o.d; }
70 bool operator != (
Direction o)
const {
return d != o.d; }
80 template<
typename Node,
typename Get_key,
typename Compare >
95 {
return p->_c[d.d]; }
103 {
return &p->_c[d.d]; }
106 template<
typename Node >
static 108 {
return static_cast<Node *
>(p->_c[d.d]); }
130 *t = next(tmp, idir);
131 next(tmp, idir, next(*t, !idir));
132 next(*t, !idir, tmp);
Bst_node()
Create uninitialized node.
Direction()
Uninitialized direction.
The direction to go in a binary search tree.
Direction operator!() const
Negate the direction.
static Bst_node * next(Bst_node const *p, Direction d)
Get next node in direction d.
static void rotate(Bst_node **t, Direction idir)
Rotate subtree t in the opposite direction of idir.
Bst_node(bool)
Create initialized node.
static Node * next(Bst_node const *p, Direction d)
Get next node in direction d as type Node.
Direction_e
The literal direction values.
Basic binary search tree (BST).
Basic type of a node in a binary search tree (BST).
static Bst_node ** next_p(Bst_node *p, Direction d)
Get pointer to link in direction d.
Direction(bool b)
Convert a boolean to a direction (false == L, true == R)
Direction(Direction_e d)
Convert a literal direction (L, R, N) to an object.
static void next(Bst_node *p, Direction d, Bst_node *n)
Set next node of p in direction d to n.