|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Classes | |
| struct | Bin_Pair |
| A node of a forest and its node in the binary tree. More... | |
| struct | Position |
| A node of a path that a traversal follows, and its position among its siblings. More... | |
Functions | |
| template<class Node > | |
| void | free_detached_tree (Node *root) noexcept |
| Frees a tree that has no parent nor siblings, without recursion; it finds the nodes by their sibling links (see destroy_tree()). | |
| template<class Node > | |
| void | detach_tree (Node *root) noexcept |
| template<class BNode > | |
| void | free_bin_tree (BNode *root) noexcept |
| Frees the binary tree root without recursion nor memory: a node with a left child turns into the right child of that child first. | |
Definition at line 1414 of file tpl_tree_node.H.
References Aleph::and, CHILD_LIST, Aleph::Dlink::cut_list(), Aleph::Dlink::del(), Aleph::Dlink::get_next(), IS_UNIQUE_SIBLING, Aleph::next(), root(), SIBLING_LIST, and Aleph::Dlink::splice().
Referenced by Aleph::destroy_tree().
|
noexcept |
Frees the binary tree root without recursion nor memory: a node with a left child turns into the right child of that child first.
Definition at line 1697 of file tpl_tree_node.H.
References LLINK, RLINK, and root().
Referenced by Aleph::forest_to_bin().
Frees a tree that has no parent nor siblings, without recursion; it finds the nodes by their sibling links (see destroy_tree()).
Definition at line 1385 of file tpl_tree_node.H.
References Aleph::Dlink::append(), Aleph::Dlink::concat_list(), Aleph::Dlink::is_empty(), Aleph::Dlink::remove_next(), root(), SIBLING_LIST, and Aleph::Dlink::wrap_header().
Referenced by Aleph::destroy_tree().