org.encog.ml.genetic.crossover
Class Splice
java.lang.Object
org.encog.ml.genetic.crossover.Splice
- All Implemented Interfaces:
- Crossover
public class Splice
- extends Object
- implements Crossover
A simple cross over where genes are simply "spliced". Genes are allowed to
repeat.
|
Constructor Summary |
Splice(int theCutLength)
Create a slice crossover with the specified cut length. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Splice
public Splice(int theCutLength)
- Create a slice crossover with the specified cut length.
- Parameters:
theCutLength - The cut length.
mate
public final void mate(Chromosome mother,
Chromosome father,
Chromosome offspring1,
Chromosome offspring2)
- Assuming this chromosome is the "mother" mate with the passed in
"father".
- Specified by:
mate in interface Crossover
- Parameters:
mother - The mother.father - The father.offspring1 - Returns the first offspringoffspring2 - Returns the second offspring.
Copyright © 2011. All Rights Reserved.