Package org.apache.commons.math.genetics
Class BinaryMutation
- java.lang.Object
-
- org.apache.commons.math.genetics.BinaryMutation
-
- All Implemented Interfaces:
MutationPolicy
public class BinaryMutation extends java.lang.Object implements MutationPolicy
Mutation forBinaryChromosome
s. Randomly changes one gene.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description BinaryMutation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Chromosome
mutate(Chromosome original)
Mutate the given chromosome.
-
-
-
Method Detail
-
mutate
public Chromosome mutate(Chromosome original)
Mutate the given chromosome. Randomly changes one gene.- Specified by:
mutate
in interfaceMutationPolicy
- Parameters:
original
- the original chromosome.- Returns:
- the mutated chromomsome.
-
-