Expand description
DarkTree structures
Structs§
- Dark
Forest - 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. - Dark
Leaf - Struct representing the information hold by a
DarkTreeLeaf
. - Dark
Tree - This struct represents a DFS post-order traversal Tree.
- Dark
Tree Into Iter - 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. - Dark
Tree Iter - Immutable iterator of a
DarkTree
, performing DFS post-order traversal on the Tree leafs. - Dark
Tree Iter Mut - Mutable iterator of a
DarkTree
, performing DFS post-order traversal on the Tree leafs. - Dark
Tree Leaf - 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 aDarkForest
, 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.