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
FieldsFields inherited from class org.opt4j.optimizer.mopso.MutateDoubleUniform
perturbationFields inherited from class org.opt4j.operator.mutate.MutateDouble
normalize, random -
Constructor Summary
ConstructorsConstructorDescriptionMutateDoubleNonUniform(Rand random, NormalizeDouble normalize, Iteration iteration, double perturbation) Constructs aMutateDoubleNonUniform. -
Method Summary
Modifier and TypeMethodDescriptionprotected doubledelta(double perturbation) Calculates the delta value for the non-uniform mutation.protected doublemutateElement(double x, double lb, double ub, double p) Mutate one element of the list.Methods inherited from class org.opt4j.operator.mutate.MutateDoubleElementwise
mutateListMethods 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:MutateDoubleElementwiseMutate one element of the list.- Overrides:
mutateElementin 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
-