G - the gene type.public interface Alterer<G extends Gene<?,G>>
GeneticAlgorithm.setAlterers(Alterer...) method.
final GeneticAlgorithm〈Float64Gene, Float64〉 ga = ...
ga.setAlterers(
new Crossover〈Float64Gene〉(0.1),
new Mutator〈Float64Gene〉(0.05),
new MeanAlterer〈Float64Gene〉(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-2013 Franz Wilhelmstötter (2013-12-18 20:17)