Top Description Constructors Methods
org.apache.commons.math3.genetics

public Class BinaryMutation

extends Object
implements MutationPolicy
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.genetics.MutationPolicy
Imports
java.util.ArrayList, .List, org.apache.commons.math3.exception.MathIllegalArgumentException, org.apache.commons.math3.exception.util.LocalizedFormats

Mutation for BinaryChromosomes. Randomly changes one gene.
Since
2.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Chromosome

Returns:

the mutated chromosome.
mutate
(Chromosome
the original chromosome.
original
)

Implements org.apache.commons.math3.genetics.MutationPolicy.mutate.

Mutate the given chromosome.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BinaryMutationback to summary
public BinaryMutation()

Method Detail

mutateback to summary
public Chromosome mutate(Chromosome original) throws MathIllegalArgumentException

Implements org.apache.commons.math3.genetics.MutationPolicy.mutate.

Mutate the given chromosome. Randomly changes one gene.

Parameters
original:Chromosome

the original chromosome.

Returns:Chromosome

the mutated chromosome.

Exceptions
MathIllegalArgumentException:
if original is not an instance of BinaryChromosome.