Package org.opt4j.operator.mutate
Class MutateDouble
java.lang.Object
org.opt4j.operator.mutate.MutateDouble
- All Implemented Interfaces:
Operator<DoubleGenotype>
,Mutate<DoubleGenotype>
- Direct Known Subclasses:
MutateDoubleElementwise
Mutate for the
DoubleGenotype
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionMutateDouble
(Rand random, NormalizeDouble normalize) Constructs aMutateDouble
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
mutate
(DoubleGenotype genotype, double p) Performs a mutation for aGenotype
.protected abstract void
mutateList
(DoubleGenotype vector, double p) The mutate internal function.
-
Field Details
-
random
-
normalize
-
-
Constructor Details
-
MutateDouble
Constructs aMutateDouble
.- Parameters:
random
- the random number generatornormalize
- the normalizer
-
-
Method Details
-
mutate
Description copied from interface:Mutate
Performs a mutation for aGenotype
.- Specified by:
mutate
in interfaceMutate<DoubleGenotype>
- Parameters:
genotype
- the genotype to be mutatedp
- the mutation rate
-
mutateList
The mutate internal function.- Parameters:
vector
- the vector of double valuesp
- the mutation rate
-