Genome used with the TreeGA. 'T' must be the type of the parameters and return values from the functions composing the tree.
Evaluate the node by calling the wrapped function with eval of each child
Get the number of children
Get the child at index by reference
Get the child at index by const reference
Set the child at index to node
Set the children. The length of children should equal getNumChildren()
Get the maximum number of nodes from this node to a leaf.
Get a deep copy of this node
Generator used to create new trees for the population. A generator will also be passed to the mutator and crossover functions of the GA.
Create a new Tree with a height of height
Register a function which cannot be known at compile time
Register a compile time known function
Register a constant value (this will strip the '()' when printing the tree)
Register constants in the range [lower, upper).
Register an input to the grown algorithm.
int x; TreeGenerator!int gen; //Same effect as 'register!( () {return x;})("x"); gen.registerInput!x;
Create a random tree with height of exactly height
Create a random node
Create a random terminator from the set of registered terminators