Operator.Operations.ContextSensitiveOperations
Class SubtreeCrossover
java.lang.Object
Operator.Operations.CrossoverOperation
Operator.Operations.ContextSensitiveOperations.SubtreeCrossover
- All Implemented Interfaces:
- Operation, ParameterI, Stochastic
public class SubtreeCrossover
- extends CrossoverOperation
Preform a crossover where the branch of one tree crosses with the branch of
another. The two branches must be of the same type so the chromosome's
codons will build the same branch on both trees. The crossover chromosome,
because it potentially can insert a small unique group of codons into a
wrapped chromosome, unwraps the chromosomes as they are crossed-over. This
also changes the size of the chromosome, even if no unwrapping occurs,
shrinking the chromosome
- Author:
- eliott bartley
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubtreeCrossover
public SubtreeCrossover(RandomNumberGenerator rng,
java.util.Properties p)
SubtreeCrossover
public SubtreeCrossover(double prob,
RandomNumberGenerator rng)
doOperation
public void doOperation(java.util.List<Individual> operands)
- Description copied from interface:
Operation
- Performs the operation on the list passed
- Specified by:
doOperation
in interface Operation
- Specified by:
doOperation
in class CrossoverOperation
- Parameters:
operands
- operands to be operated on
doOperation
public void doOperation(Individual operand)
- Description copied from interface:
Operation
- Performs the operation on an operand
- Parameters:
operand
- operand to perform operation on