mss.ea.mut
Class SubstitutionArrayMutation
java.lang.Object
|
+--mss.ea.core.GeneticOperator
|
+--mss.ea.mut.Mutation
|
+--mss.ea.mut.ChromosomeMutation
|
+--mss.ea.mut.ArrayMutation
|
+--mss.ea.mut.SubstitutionArrayMutation
- public class SubstitutionArrayMutation
- extends ArrayMutation
Substitution mutation of an array.
This operator will replace random elements with elements selected randomly from a given substitution list.
- Since:
- 0.1.1
- Version:
- $Revision: 1.2 $ $Date: 2001/09/13 08:17:05 $
- Author:
- Andreas Rummler
Constructor Summary |
SubstitutionArrayMutation(float propability,
float percentage,
java.lang.Object[] substList)
Constructor with mutation propability and number of clipped elements. |
SubstitutionArrayMutation(float propability,
int number,
java.lang.Object[] substList)
Constructor with mutation propability and number of clipped elements. |
SubstitutionArrayMutation(float propability,
java.lang.Object[] substList)
Constructor with mutation propability.
|
SubstitutionArrayMutation(java.lang.Object[] substList)
Constructor.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
substitutionList
protected java.lang.Object[] substitutionList
substNumber
protected int substNumber
substPercentage
protected float substPercentage
SubstitutionArrayMutation
public SubstitutionArrayMutation(java.lang.Object[] substList)
- Constructor.
The mutation propability is set to 0.05.
- Parameters:
substList
- array with objects for substitution
SubstitutionArrayMutation
public SubstitutionArrayMutation(float propability,
java.lang.Object[] substList)
- Constructor with mutation propability.
The number of clipped elements is randomly calculated.
- Parameters:
propability
- mutation propabilitysubstList
- array with objects for substitution
SubstitutionArrayMutation
public SubstitutionArrayMutation(float propability,
float percentage,
java.lang.Object[] substList)
- Constructor with mutation propability and number of clipped elements.
- Parameters:
propability
- mutation propabilitypercentage
- percentage value of the number of elements to be clippedsubstList
- array with objects for substitution
SubstitutionArrayMutation
public SubstitutionArrayMutation(float propability,
int number,
java.lang.Object[] substList)
- Constructor with mutation propability and number of clipped elements.
- Parameters:
propability
- mutation propabilitynumber
- number of elements to be clippedsubstList
- array with objects for substitution
mutate
public void mutate(ArrayChromosome cr)
throws MutationException
- Performs the mutation.
- Overrides:
mutate
in class ArrayMutation
- Parameters:
cr
- chromosome of type array- Throws:
MutationException
- thrown, if operator fails
substitute
protected void substitute(java.lang.Object o)
setupSubstArray
protected int[] setupSubstArray(java.lang.Object o,
int arrayLength)
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS