Package org.opt4j.operators.mutate
Class MutateDoubleElementwise
- java.lang.Object
-
- org.opt4j.operators.mutate.MutateDouble
-
- org.opt4j.operators.mutate.MutateDoubleElementwise
-
- All Implemented Interfaces:
org.opt4j.core.optimizer.Operator<org.opt4j.core.genotype.DoubleGenotype>
,Mutate<org.opt4j.core.genotype.DoubleGenotype>
- Direct Known Subclasses:
MutateDoubleGauss
,MutateDoublePolynomial
public abstract class MutateDoubleElementwise extends MutateDouble
-
-
Field Summary
-
Fields inherited from class org.opt4j.operators.mutate.MutateDouble
normalize, random
-
-
Constructor Summary
Constructors Constructor Description MutateDoubleElementwise(org.opt4j.core.common.random.Rand random, NormalizeDouble normalize)
Constructs aMutateDoubleElementwise
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract double
mutateElement(double element, double lb, double ub, double p)
Mutate one element of the list.protected void
mutateList(org.opt4j.core.genotype.DoubleGenotype vector, double p)
The mutate internal function.-
Methods inherited from class org.opt4j.operators.mutate.MutateDouble
mutate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opt4j.operators.mutate.Mutate
getOperatorType
-
-
-
-
Constructor Detail
-
MutateDoubleElementwise
public MutateDoubleElementwise(org.opt4j.core.common.random.Rand random, NormalizeDouble normalize)
Constructs aMutateDoubleElementwise
.- Parameters:
random
- the random number generatornormalize
- the normalizer
-
-
Method Detail
-
mutateList
protected void mutateList(org.opt4j.core.genotype.DoubleGenotype vector, double p)
Description copied from class:MutateDouble
The mutate internal function.- Specified by:
mutateList
in 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
-
-