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
public abstract class MutateDoubleElementwise extends MutateDouble
-
-
Field Summary
-
Fields inherited from class org.opt4j.operator.mutate.MutateDouble
normalize, random
-
-
Constructor Summary
Constructors Constructor Description MutateDoubleElementwise(Rand random, NormalizeDouble normalize)Constructs aMutateDoubleElementwise.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract doublemutateElement(double element, double lb, double ub, double p)Mutate one element of the list.protected voidmutateList(DoubleGenotype vector, double p)The mutate internal function.-
Methods inherited from class org.opt4j.operator.mutate.MutateDouble
mutate
-
-
-
-
Constructor Detail
-
MutateDoubleElementwise
public MutateDoubleElementwise(Rand random, NormalizeDouble normalize)
Constructs aMutateDoubleElementwise.- Parameters:
random- the random number generatornormalize- the normalizer
-
-
Method Detail
-
mutateList
protected void mutateList(DoubleGenotype vector, double p)
Description copied from class:MutateDoubleThe mutate internal function.- Specified by:
mutateListin 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
-
-