org.encog.ml.genetic.crossover
Class Splice

java.lang.Object
  extended by 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.
 
Method Summary
 void mate(Chromosome mother, Chromosome father, Chromosome offspring1, Chromosome offspring2)
          Assuming this chromosome is the "mother" mate with the passed in "father".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Splice

public Splice(int theCutLength)
Create a slice crossover with the specified cut length.

Parameters:
theCutLength - The cut length.
Method Detail

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 offspring
offspring2 - Returns the second offspring.


Copyright © 2011. All Rights Reserved.