Package org.opt4j.operator.mutate
Class MutateDoubleGauss
- java.lang.Object
-
- org.opt4j.operator.mutate.MutateDouble
-
- org.opt4j.operator.mutate.MutateDoubleElementwise
-
- org.opt4j.operator.mutate.MutateDoubleGauss
-
- All Implemented Interfaces:
Operator<DoubleGenotype>
,Mutate<DoubleGenotype>
public class MutateDoubleGauss extends MutateDoubleElementwise
TheMutateDoubleGauss
.
-
-
Field Summary
Fields Modifier and Type Field Description protected double
sigma
-
Fields inherited from class org.opt4j.operator.mutate.MutateDouble
normalize, random
-
-
Constructor Summary
Constructors Constructor Description MutateDoubleGauss(Rand random, NormalizeDouble normalize, double sigma)
Constructs aMutateDoubleGauss
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
mutateElement(double element, 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
-
-
-
-
Constructor Detail
-
MutateDoubleGauss
@Inject public MutateDoubleGauss(Rand random, NormalizeDouble normalize, double sigma)
Constructs aMutateDoubleGauss
.- Parameters:
random
- the random number generatornormalize
- the normalizersigma
- the sigma value
-
-
Method Detail
-
mutateElement
protected double mutateElement(double element, double lb, double ub, double p)
Description copied from class:MutateDoubleElementwise
Mutate one element of the list.- Specified by:
mutateElement
in classMutateDoubleElementwise
- Parameters:
element
- the elementlb
- the lower boundub
- the upper boundp
- the mutation rate- Returns:
- the mutated element
-
-