public final 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 |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
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 int hashCode()
hashCode
in class Mutator<G extends NumericGene<?,G>,C extends Comparable<? super C>>
public boolean equals(Object obj)
equals
in class Mutator<G extends NumericGene<?,G>,C extends Comparable<? super C>>
public String toString()
toString
in class Mutator<G extends NumericGene<?,G>,C extends Comparable<? super C>>
© 2007-2017 Franz Wilhelmstötter (2017-11-16 19:35)