This package can be installed by adding modified_preorder_tree to your list of dependencies in mix.exs:
def deps do
[
{:modified_preorder_tree, "~> 0.1.1"}
]
endNumbers are assigned such that a path can be traced around the tree,
taking in every node.
The path here starts at root, flowing down the left,
around the bottom of the b subtree, then up to the e branch of a,
and from there to the other branches of root, before flowing back to root.
Leaf nodes (those with no children) have Left and Right values immediately after each other;
f, for example, is 11/12.
The parent of a node has a smaller Left and a bigger Right;
which can be used to trace up the tree finding parent nodes,
until you hit a Left of 0 (meaning the root node).
- Constructors
from_node/1
- Reducers
insert/3insert!/3update_nodes/2update_nodes/3
- Converters
fetch_ancestors_and_self/2fetch_ancestors_and_self!/2fetch_children/2fetch_children!/2fetch_descendents/2fetch_descendents!/2fetch_family_tree/2fetch_family_tree!/2fetch_node/2fetch_node!/2fetch_parent/2fetch_parent!/2fetch_transition_path/3fetch_transition_path!/3nodes/1