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>
public class MutateDoubleNonUniform extends MutateDoubleUniform
TheMutateDoubleNonUniformnon-uniformly mutates aDoubleGenotypeelementwise.
-
-
Field Summary
Fields Modifier and Type Field Description protected Iterationiteration-
Fields inherited from class org.opt4j.optimizer.mopso.MutateDoubleUniform
perturbation
-
Fields inherited from class org.opt4j.operator.mutate.MutateDouble
normalize, random
-
-
Constructor Summary
Constructors Constructor Description MutateDoubleNonUniform(Rand random, NormalizeDouble normalize, Iteration iteration, double perturbation)Constructs aMutateDoubleNonUniform.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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
mutateList
-
Methods inherited from class org.opt4j.operator.mutate.MutateDouble
mutate
-
-
-
-
Field Detail
-
iteration
protected final Iteration iteration
-
-
Constructor Detail
-
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 Detail
-
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
-
-