skbio.tree.BPTree.last_child#

BPTree.last_child(i)[source]#

Index of the last (rightmost) child of a node.

Parameters:
iint

Index of the node to evaluate.

Returns:
int

Index of the last child of node i, or 0 if i is a tip (0 is the root, which can never be a child).

Notes

Returns an integer index into the parentheses bit array, not a node object. Corresponds to accessing children[-1] on a TreeNode.