org.apache.commons.math.genetics
Class RandomKeyMutation
java.lang.Object
org.apache.commons.math.genetics.RandomKeyMutation
- All Implemented Interfaces:
- MutationPolicy
public class RandomKeyMutation
- extends Object
- implements MutationPolicy
Mutation operator for RandomKeys. Changes a randomly chosen element
of the array representation to a random value uniformly distributed in [0,1].
- Since:
- 2.0
RandomKeyMutation
public RandomKeyMutation()
mutate
public Chromosome mutate(Chromosome original)
- Mutate the given chromosome.
- Specified by:
mutate in interface MutationPolicy
- Parameters:
original - the original chromosome.
- Returns:
- the mutated chromomsome.
- Throws:
IllegalArgumentException - if original is not a
RandomKey instance
jHepWork 3.2 © jWork.org