Package org.opt4j.operator.mutate
Class MutateBoolean
java.lang.Object
org.opt4j.operator.mutate.MutateBoolean
- All Implemented Interfaces:
Operator<BooleanGenotype>
,Mutate<BooleanGenotype>
Mutate for the
BooleanGenotype
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionMutateBoolean
(Rand random) Constructs a newMutateBoolean
with the given mutation rate. -
Method Summary
Modifier and TypeMethodDescriptionvoid
mutate
(BooleanGenotype genotype, double p) Performs a mutation for aGenotype
.
-
Field Details
-
random
-
-
Constructor Details
-
MutateBoolean
Constructs a newMutateBoolean
with the given mutation rate.- Parameters:
random
- the random number generator
-
-
Method Details
-
mutate
Description copied from interface:Mutate
Performs a mutation for aGenotype
.- Specified by:
mutate
in interfaceMutate<BooleanGenotype>
- Parameters:
genotype
- the genotype to be mutatedp
- the mutation rate
-