public abstract class MutateDouble extends java.lang.Object implements Mutate<org.opt4j.core.genotype.DoubleGenotype>
DoubleGenotype
.Modifier and Type | Field and Description |
---|---|
protected NormalizeDouble |
normalize |
protected java.util.Random |
random |
Constructor and Description |
---|
MutateDouble(org.opt4j.core.common.random.Rand random,
NormalizeDouble normalize)
Constructs a
MutateDouble . |
Modifier and Type | Method and Description |
---|---|
void |
mutate(org.opt4j.core.genotype.DoubleGenotype genotype,
double p)
Performs a mutation for a
Genotype . |
protected abstract void |
mutateList(org.opt4j.core.genotype.DoubleGenotype vector,
double p)
The mutate internal function.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperatorType
protected final java.util.Random random
protected final NormalizeDouble normalize
@Inject public MutateDouble(org.opt4j.core.common.random.Rand random, NormalizeDouble normalize)
MutateDouble
.random
- the random number generatornormalize
- the normalizerpublic void mutate(org.opt4j.core.genotype.DoubleGenotype genotype, double p)
Mutate
Genotype
.protected abstract void mutateList(org.opt4j.core.genotype.DoubleGenotype vector, double p)
vector
- the vector of double valuesp
- the mutation rate