skbio.tree.BPTree.level_next#

BPTree.level_next(i)[source]#

Index of the next node at the same depth.

Parameters:
iint

Index of the node to evaluate.

Returns:
int

Index of the next node at the same depth as node i, or -1 if there is no such node.

Notes

Returns an integer index into the parentheses bit array, not a node object. levelorder traverses all nodes depth by depth.