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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMutateDouble(Rand random, NormalizeDouble normalize) Constructs aMutateDouble. -
Method Summary
Modifier and TypeMethodDescriptionvoidmutate(DoubleGenotype genotype, double p) Performs a mutation for aGenotype.protected abstract voidmutateList(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:MutatePerforms a mutation for aGenotype.- Specified by:
mutatein 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
-