Package org.opt4j.operator.mutate
Class MutateDoubleElementwise
java.lang.Object
org.opt4j.operator.mutate.MutateDouble
org.opt4j.operator.mutate.MutateDoubleElementwise
- All Implemented Interfaces:
Operator<DoubleGenotype>
,Mutate<DoubleGenotype>
- Direct Known Subclasses:
MutateDoubleGauss
,MutateDoublePolynomial
,MutateDoubleUniform
-
Field Summary
Fields inherited from class org.opt4j.operator.mutate.MutateDouble
normalize, random
-
Constructor Summary
ConstructorDescriptionMutateDoubleElementwise
(Rand random, NormalizeDouble normalize) Constructs aMutateDoubleElementwise
. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract double
mutateElement
(double element, double lb, double ub, double p) Mutate one element of the list.protected void
mutateList
(DoubleGenotype vector, double p) The mutate internal function.Methods inherited from class org.opt4j.operator.mutate.MutateDouble
mutate
-
Constructor Details
-
MutateDoubleElementwise
Constructs aMutateDoubleElementwise
.- Parameters:
random
- the random number generatornormalize
- the normalizer
-
-
Method Details
-
mutateList
Description copied from class:MutateDouble
The mutate internal function.- Specified by:
mutateList
in classMutateDouble
- Parameters:
vector
- the vector of double valuesp
- the mutation rate
-
mutateElement
protected abstract double mutateElement(double element, double lb, double ub, double p) Mutate one element of the list.- Parameters:
element
- the elementlb
- the lower boundub
- the upper boundp
- the mutation rate- Returns:
- the mutated element
-