Package org.opt4j.optimizer.mopso
Class MutateDoubleNonUniform
java.lang.Object
org.opt4j.operator.mutate.MutateDouble
org.opt4j.operator.mutate.MutateDoubleElementwise
org.opt4j.optimizer.mopso.MutateDoubleUniform
org.opt4j.optimizer.mopso.MutateDoubleNonUniform
- All Implemented Interfaces:
Operator<DoubleGenotype>
,Mutate<DoubleGenotype>
The
MutateDoubleNonUniform
non-uniformly mutates a
DoubleGenotype
elementwise.-
Field Summary
Fields inherited from class org.opt4j.optimizer.mopso.MutateDoubleUniform
perturbation
Fields inherited from class org.opt4j.operator.mutate.MutateDouble
normalize, random
-
Constructor Summary
ConstructorDescriptionMutateDoubleNonUniform
(Rand random, NormalizeDouble normalize, Iteration iteration, double perturbation) Constructs aMutateDoubleNonUniform
. -
Method Summary
Modifier and TypeMethodDescriptionprotected double
delta
(double perturbation) Calculates the delta value for the non-uniform mutation.protected double
mutateElement
(double x, double lb, double ub, double p) Mutate one element of the list.Methods inherited from class org.opt4j.operator.mutate.MutateDoubleElementwise
mutateList
Methods inherited from class org.opt4j.operator.mutate.MutateDouble
mutate
-
Field Details
-
iteration
-
-
Constructor Details
-
MutateDoubleNonUniform
@Inject public MutateDoubleNonUniform(Rand random, NormalizeDouble normalize, Iteration iteration, double perturbation) Constructs aMutateDoubleNonUniform
.- Parameters:
random
- the random number generatornormalize
- the normalize operatoriteration
- the iteration counterperturbation
- the perturbation index
-
-
Method Details
-
mutateElement
protected double mutateElement(double x, double lb, double ub, double p) Description copied from class:MutateDoubleElementwise
Mutate one element of the list.- Overrides:
mutateElement
in classMutateDoubleUniform
- Parameters:
x
- the elementlb
- the lower boundub
- the upper boundp
- the mutation rate- Returns:
- the mutated element
-
delta
protected double delta(double perturbation) Calculates the delta value for the non-uniform mutation.- Parameters:
perturbation
- the perturbation value- Returns:
- the delta value
-