public class GaussianMutator<G extends NumericGene<?,G>,C extends Comparable<? super C>> extends Mutator<G,C>
NumericGene
.
This mutator picks a new value based on a Gaussian distribution around the
current value of the gene. The variance of the new value (before clipping to
the allowed gene range) will be
The new value will be cropped to the gene's boundaries.
_probability
DEFAULT_ALTER_PROBABILITY
Constructor and Description |
---|
GaussianMutator() |
GaussianMutator(double probability) |
Modifier and Type | Method and Description |
---|---|
protected G |
mutate(G gene,
Random random)
Mutates the given gene.
|
String |
toString() |
getProbability
public GaussianMutator(double probability)
public GaussianMutator()
protected G mutate(G gene, Random random)
Mutator
mutate
in class Mutator<G extends NumericGene<?,G>,C extends Comparable<? super C>>
gene
- the gene to mutaterandom
- the random engine used for the genotype mutationpublic String toString()
toString
in class Mutator<G extends NumericGene<?,G>,C extends Comparable<? super C>>
© 2007-2019 Franz Wilhelmstötter (2019-06-23 15:39)