53 self_type *child_at(Direction d)
const;
60 Direction direction_of(self_type *
const &n)
const;
66 self_type *left_most_descendant()
const;
72 Direction flip(Direction d);
90 self_type *rotate(Direction dir);
101 self_type *set_child(self_type *child, Direction dir);
116 void clear_child(Direction dir);
138 virtual bool structure_validate();
147 void replace_with(self_type *n);
155 self_type *rebalance_after_insert();
169 self_type *rebalance_after_remove(Color c, Direction dir);
178 self_type *ripple_structure_fixup();
191 static self_type * buildTree(self_type*& head,
int n);
194 static self_type * buildTree(self_type*& head,
int n,
bool isBlack);
203 static void printTree(self_type* root, std::string indent =
"",
bool last =
true);
217 return swoc::ptr_ref_cast<self_type>(t->
_next);
222 return swoc::ptr_ref_cast<self_type>(t->
_prev);