public class MutateIntegerRandom extends java.lang.Object implements MutateInteger
MutateIntegerRandom
mutates each element of the
IntegerGenotype
with the mutation rate. Here, a new value is created
randomly between the lower and upper bounds.Modifier and Type | Field and Description |
---|---|
protected java.util.Random |
random |
Constructor and Description |
---|
MutateIntegerRandom(org.opt4j.core.common.random.Rand random)
Constructs a
MutateIntegerRandom . |
Modifier and Type | Method and Description |
---|---|
void |
mutate(org.opt4j.core.genotype.IntegerGenotype genotype,
double p)
Performs a mutation for a
Genotype . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperatorType
@Inject public MutateIntegerRandom(org.opt4j.core.common.random.Rand random)
MutateIntegerRandom
.random
- the random number generatorpublic void mutate(org.opt4j.core.genotype.IntegerGenotype genotype, double p)
Mutate
Genotype
.