skbio.tree.BPTree.preorder_rank#
- BPTree.preorder_rank(i)[source]#
Preorder rank of a node.
- Parameters:
- iint
Index of the node to evaluate.
- Returns:
- int
The position of node
iin a preorder traversal of the tree, counting from 1: the root’s rank is 1.
Notes
Returns the node’s integer position in preorder, not a node object. This differs from
preorder, which yields the nodes of the tree in preorder. The inverse ofpreorder_select.