Module dark_tree

Source
Expand description

DarkTree structures

Structs§

DarkForest
This struct represents a Forest of DarkTree. It is advised to always execute .build() after finishing setting up the Forest, to properly index it and check its integrity.
DarkLeaf
Struct representing the information hold by a DarkTreeLeaf.
DarkTree
This struct represents a DFS post-order traversal Tree.
DarkTreeIntoIter
Special iterator of a DarkTree, performing DFS post-order traversal on the Tree leafs, consuming each leaf. Since this iterator consumes the tree, it becomes unusable after it’s moved.
DarkTreeIter
Immutable iterator of a DarkTree, performing DFS post-order traversal on the Tree leafs.
DarkTreeIterMut
Mutable iterator of a DarkTree, performing DFS post-order traversal on the Tree leafs.
DarkTreeLeaf
This struct represents a Leaf of a DarkTree, holding this tree node data, along with its positional index, based on tree’s traversal order.

Functions§

check_children 🔒
Check DarkLeaf children indexes validity
dark_forest_leaf_vec_integrity_check
Auxiliary function to verify provided DarkLeaf slice, representing the leafs of a DarkForest, is properly bounded and its members indexes are valid. Slice must contain at least 1 leaf.
dark_leaf_vec_integrity_check
Auxiliary function to verify provided DarkLeaf slice is properly bounded and its members indexes are valid. Optionally, an offset can be provided in case leaf indexes are known to be shifted.