neat.STree.__len__

STree.__len__(node=None)[source]

Return the number of nodes in the tree. If an input node is specified, the number of nodes in the subtree of the input node is returned

Parameters:

node (neat.SNode (optional)) – The starting node. Defaults to root

Return type:

int