public final class ConstantToFunctionMutation extends Object implements GeneticOperator
| Constructor and Description |
|---|
ConstantToFunctionMutation(Random random,
TreeGenerator treeGenerator)
Creates a
ConstantToFunctionMutation that uses the given TreeGenerator to generate new subtrees to replace existing terminals. |
| Modifier and Type | Method and Description |
|---|---|
Node |
evolve(NodeSelector selector)
Returns a new
Node evolved from existing instances. |
public ConstantToFunctionMutation(Random random, TreeGenerator treeGenerator)
ConstantToFunctionMutation that uses the given TreeGenerator to generate new subtrees to replace existing terminals.random - used to randomly select terminal nodes to mutatetreeGenerator - used to generate new subtrees to replace terminal nodes selected for mutationpublic Node evolve(NodeSelector selector)
GeneticOperatorNode evolved from existing instances.evolve in interface GeneticOperatorselector - used to select the existing instances to use as a basis for evolving a new instanceNode evolved from existing instances obtained from selectorOakGP Genetic Programming Framework