mss.ea.mut
Class IntegerRelativeRangeMutation
java.lang.Object
|
+--mss.ea.core.GeneticOperator
|
+--mss.ea.mut.Mutation
|
+--mss.ea.mut.ChromosomeMutation
|
+--mss.ea.mut.IntegerMutation
|
+--mss.ea.mut.IntegerRelativeRangeMutation
- public class IntegerRelativeRangeMutation
- extends IntegerMutation
Mutation of a integer number with a mutation range.
This operator will add a random integer number within the given range.
- Since:
- 0.1
- Version:
- 0.1 (12-11-00)
- Author:
- Andreas Rummler
Field Summary |
protected float |
range
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
range
protected float range
IntegerRelativeRangeMutation
public IntegerRelativeRangeMutation()
- Constructor.
The mutation propability is set to 0.05 and the mutation range is set to 10%.
IntegerRelativeRangeMutation
public IntegerRelativeRangeMutation(float propability)
- Constructor with mutation propability.
The mutation range is set to 10%.
- Parameters:
propability
- mutation propability
IntegerRelativeRangeMutation
public IntegerRelativeRangeMutation(float propability,
float range)
- Constructor with mutation propability and mutation range.
If range <= 0% the range is silently set to 10%.
- Parameters:
propability
- mutation propabilityrange
- mutation range
mutate
public void mutate(Chromosome cr)
throws MutationException
- Performs the mutation.
- Overrides:
mutate
in class ChromosomeMutation
- Parameters:
cr
- chromosome of type IntegerChromosome- Throws:
MutationException
- thrown, if operator fails
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS