mss.ea.mut
Class RotateArrayMutation
java.lang.Object
|
+--mss.ea.core.GeneticOperator
|
+--mss.ea.mut.Mutation
|
+--mss.ea.mut.ChromosomeMutation
|
+--mss.ea.mut.ArrayMutation
|
+--mss.ea.mut.RotateArrayMutation
- public class RotateArrayMutation
- extends ArrayMutation
Rotate mutation of an array.
This operator will rotate the contents of an array.
- Since:
- 0.1
- Version:
- 0.1 (08-20-2001)
- Author:
- Andreas Rummler
Constructor Summary |
RotateArrayMutation()
Constructor.
|
RotateArrayMutation(float propability)
Constructor with mutation propability.
|
RotateArrayMutation(float propability,
float percentage)
Constructor with mutation propability and number of rotated elements. |
RotateArrayMutation(float propability,
int number)
Constructor with mutation propability and number of rotated elements. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
rotateDistance
protected int rotateDistance
rotatePercentage
protected float rotatePercentage
RotateArrayMutation
public RotateArrayMutation()
- Constructor.
The mutation propability is set to 0.05.
RotateArrayMutation
public RotateArrayMutation(float propability)
- Constructor with mutation propability.
The number of rotated elements is randomly calculated.
- Parameters:
propability
- mutation propability
RotateArrayMutation
public RotateArrayMutation(float propability,
float percentage)
- Constructor with mutation propability and number of rotated elements.
- Parameters:
propability
- mutation propabilitypercentage
- percentage value of the number of elements to be rotated
RotateArrayMutation
public RotateArrayMutation(float propability,
int number)
- Constructor with mutation propability and number of rotated elements.
- Parameters:
propability
- mutation propabilitynumber
- number of elements to be rotated
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
rotate
protected void rotate(java.lang.Object o)
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS