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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMutateBoolean(Rand random) Constructs a newMutateBooleanwith the given mutation rate. -
Method Summary
Modifier and TypeMethodDescriptionvoidmutate(BooleanGenotype genotype, double p) Performs a mutation for aGenotype.
-
Field Details
-
random
-
-
Constructor Details
-
MutateBoolean
Constructs a newMutateBooleanwith the given mutation rate.- Parameters:
random- the random number generator
-
-
Method Details
-
mutate
Description copied from interface:MutatePerforms a mutation for aGenotype.- Specified by:
mutatein interfaceMutate<BooleanGenotype>- Parameters:
genotype- the genotype to be mutatedp- the mutation rate
-