Package org.opt4j.operators.mutate
Class MutateDouble
- java.lang.Object
-
- org.opt4j.operators.mutate.MutateDouble
-
- All Implemented Interfaces:
org.opt4j.core.optimizer.Operator<org.opt4j.core.genotype.DoubleGenotype>
,Mutate<org.opt4j.core.genotype.DoubleGenotype>
- Direct Known Subclasses:
MutateDoubleElementwise
public abstract class MutateDouble extends java.lang.Object implements Mutate<org.opt4j.core.genotype.DoubleGenotype>
Mutate for theDoubleGenotype
.
-
-
Field Summary
Fields Modifier and Type Field Description protected NormalizeDouble
normalize
protected java.util.Random
random
-
Constructor Summary
Constructors Constructor Description MutateDouble(org.opt4j.core.common.random.Rand random, NormalizeDouble normalize)
Constructs aMutateDouble
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
mutate(org.opt4j.core.genotype.DoubleGenotype genotype, double p)
Performs a mutation for aGenotype
.protected abstract void
mutateList(org.opt4j.core.genotype.DoubleGenotype vector, double p)
The mutate internal function.-
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
-
-
-
-
Field Detail
-
random
protected final java.util.Random random
-
normalize
protected final NormalizeDouble normalize
-
-
Constructor Detail
-
MutateDouble
@Inject public MutateDouble(org.opt4j.core.common.random.Rand random, NormalizeDouble normalize)
Constructs aMutateDouble
.- Parameters:
random
- the random number generatornormalize
- the normalizer
-
-
Method Detail
-
mutate
public void mutate(org.opt4j.core.genotype.DoubleGenotype genotype, double p)
Description copied from interface:Mutate
Performs a mutation for aGenotype
.
-
mutateList
protected abstract void mutateList(org.opt4j.core.genotype.DoubleGenotype vector, double p)
The mutate internal function.- Parameters:
vector
- the vector of double valuesp
- the mutation rate
-
-