neat.STree.get_sub_tree¶
- STree.get_sub_tree(node, new_tree=None)[source]¶
Get the subtree of the specified node. The root of the subtree is a new node with the same children as the original node, but None instead of a parent.
- Parameters:
node (neat.SNode) – root of the sub tree
new_tree (neat.STree or derived class) – the type of tree in which the nodes of the subtree are to be copied
- Returns:
Subtree of with
nodeas root- Return type:
neat.STree