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 int |
mutate(MSeq<G> genes,
double p)
Template method which gives an (re)implementation of the mutation class
the possibility to perform its own mutation operation, based on a
writable gene array and the gene mutation probability p.
|
String |
toString() |
getProbability
public GaussianMutator(double probability)
public GaussianMutator()
protected int mutate(MSeq<G> genes, double p)
Mutator
Template method which gives an (re)implementation of the mutation class the possibility to perform its own mutation operation, based on a writable gene array and the gene mutation probability p.
mutate
in class Mutator<G extends NumericGene<?,G>,C extends Comparable<? super C>>
genes
- the genes to mutate.p
- the gene mutation probability.public 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-2014 Franz Wilhelmstötter (2014-12-28 10:45)