org.encog.ml.genetic.crossover
public class Splice extends Object implements EvolutionaryOperator
| Constructor and Description |
|---|
Splice(int theCutLength)
Create a slice crossover with the specified cut length.
|
| Modifier and Type | Method and Description |
|---|---|
void |
init(EvolutionaryAlgorithm theOwner)
Called to setup the evolutionary operator.
|
int |
offspringProduced() |
int |
parentsNeeded() |
void |
performOperation(Random rnd,
Genome[] parents,
int parentIndex,
Genome[] offspring,
int offspringIndex)
Perform the evolutionary operation.
|
public Splice(int theCutLength)
theCutLength - The cut length.public void performOperation(Random rnd, Genome[] parents, int parentIndex, Genome[] offspring, int offspringIndex)
performOperation in interface EvolutionaryOperatorrnd - A random number generator.parents - The parents.parentIndex - The index into the parents array.offspring - The offspring.offspringIndex - An index into the offspring array.public int offspringProduced()
offspringProduced in interface EvolutionaryOperatorpublic int parentsNeeded()
parentsNeeded in interface EvolutionaryOperatorpublic void init(EvolutionaryAlgorithm theOwner)
init in interface EvolutionaryOperatortheOwner - The evolutionary algorithm used with this operator.Copyright © 2014. All Rights Reserved.