Module io.jenetics.base
Package io.jenetics
Class GaussianMutator<G extends NumericGene<?,G>,C extends Comparable<? super C>>
java.lang.Object
io.jenetics.AbstractAlterer<G,C>
io.jenetics.Mutator<G,C>
io.jenetics.GaussianMutator<G,C>
- All Implemented Interfaces:
Alterer<G,C>
public class GaussianMutator<G extends NumericGene<?,G>,C extends Comparable<? super C>>
extends Mutator<G,C>
The GaussianMutator class performs the mutation of a
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
- Since:
- 1.0
- Version:
- 6.1
-
Field Summary
Fields inherited from class io.jenetics.AbstractAlterer
_probabilityFields inherited from interface io.jenetics.Alterer
DEFAULT_ALTER_PROBABILITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Gmutate(G gene, RandomGenerator random) Mutates the given gene.Methods inherited from class io.jenetics.AbstractAlterer
probability
-
Constructor Details
-
GaussianMutator
-
GaussianMutator
public GaussianMutator()
-
-
Method Details
-
mutate
Description copied from class:MutatorMutates the given gene.- Overrides:
mutatein classMutator<G extends NumericGene<?,G>, C extends Comparable<? super C>> - Parameters:
gene- the gene to mutaterandom- the random engine used for the genotype mutation- Returns:
- the mutation result
-