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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmutate(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:MutatePerforms a mutation for aGenotype.- Specified by:
mutatein interfaceMutate<IntegerGenotype>- Parameters:
genotype- the genotype to be mutatedp- the mutation rate
-