neat.STree.sisterLeafs

STree.sisterLeafs(node)[source]

Find the leafs that are in the subtree of the nearest bifurcation node up from the input node.

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_leafs is the same as the number of corresponding_children, the subtree of each element of corresponding_children has exactly one leaf, the corresponding element in sister_leafs