Package org.opt4j.operator.mutate
Class MutateIntegerRandom
java.lang.Object
org.opt4j.operator.mutate.MutateIntegerRandom
- All Implemented Interfaces:
Operator<IntegerGenotype>
,Mutate<IntegerGenotype>
,MutateInteger
The
MutateIntegerRandom
mutates each element of the
IntegerGenotype
with the mutation rate. Here, a new value is created
randomly between the lower and upper bounds.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
mutate
(IntegerGenotype genotype, double p) Performs a mutation for aGenotype
.
-
Field Details
-
random
-
-
Constructor Details
-
MutateIntegerRandom
Constructs aMutateIntegerRandom
.- Parameters:
random
- the random number generator
-
-
Method Details
-
mutate
Description copied from interface:Mutate
Performs a mutation for aGenotype
.- Specified by:
mutate
in interfaceMutate<IntegerGenotype>
- Parameters:
genotype
- the genotype to be mutatedp
- the mutation rate
-