neat.STree.sister_leafs¶
- STree.sister_leafs(node)[source]¶
Find the leafs that are in the subtree of the nearest bifurcation node on the path from input node to root.
- Parameters:
node (neat.SNode) – Starting node for search
- Returns:
node (neat.SNode) – the bifurcation node
sister_leafs (list of neat.SNode) – The first element is the input node. The others are the leafs of the subtree emanating from the bifurcation node that are not in the subtree from the input node.
corresponding_children (list of neat.SNode) – The children of the bifurcation node. If the number of leafs
sister_leafsis the same as the number ofcorresponding_children, the subtree of each element ofcorresponding_childrenhas exactly one leaf, the corresponding element insister_leafs