gpalta.ops
Class TreeOperator

java.lang.Object
  extended by gpalta.ops.TreeOperator

public class TreeOperator
extends java.lang.Object

Performs genetic operations between trees. Currently crossover, mutation and reproduction are implemented


Constructor Summary
TreeOperator(Config config, NodeFactory nodeFactory)
           
 
Method Summary
 boolean crossOver(Tree tree1, Tree tree2)
           
 void mutateBuild(Tree tree)
           
<T extends Tree>
void
operate(java.util.List<T> population)
          Performs the genetic operations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeOperator

public TreeOperator(Config config,
                    NodeFactory nodeFactory)
Method Detail

operate

public <T extends Tree> void operate(java.util.List<T> population)
Performs the genetic operations. Probabilities for each op are assigned in the Config object

Parameters:
population - The list of trees that passed the selection process

mutateBuild

public void mutateBuild(Tree tree)

crossOver

public boolean crossOver(Tree tree1,
                         Tree tree2)