G
- the gene type.public interface Alterer<G extends Gene<?,G>>
GeneticAlgorithm.setAlterers(Alterer...)
method.
final GeneticAlgorithm〈DoubleGene, Double〉 ga = ...
ga.setAlterers(
new Crossover〈DoubleGene〉(0.1),
new Mutator〈DoubleGene〉(0.05),
new MeanAlterer〈DoubleGene〉(0.2)
);
Modifier and Type | Method and Description |
---|---|
<C extends Comparable<? super C>> |
alter(Population<G,C> population,
int generation)
Alters (recombine) a given population.
|
<C extends Comparable<? super C>> int alter(Population<G,C> population, int generation)
population
is empty, nothing is altered.population
- The Population to be altered. If the
population
is null
or empty, nothing is altered.generation
- the date of birth (generation) of the altered phenotypes.NullPointerException
- if the given population
is
null
.© 2007-2014 Franz Wilhelmstötter (2014-03-07 19:35)