Crate treemath

Source

Modules§

bounds

Functions§

child_with_direction
common_ancestor
copath
direct_path
left
level
Returns the height of that node in the tree
node_width
Number of nodes needed to represent a tree with [leaf_count] leaves.
parent
Get the parent of a node, return None if the node is the root
right
root
Returns the root node
sibling
Given a node, return the left/right child of his parent, return None when root