eaLib API Docs
Last Modified : January 7 2002

mss.ea.mut
Class FloatRangeMutation

java.lang.Object
  |
  +--mss.ea.core.GeneticOperator
        |
        +--mss.ea.mut.Mutation
              |
              +--mss.ea.mut.ChromosomeMutation
                    |
                    +--mss.ea.mut.FloatMutation
                          |
                          +--mss.ea.mut.FloatRangeMutation

public class FloatRangeMutation
extends FloatMutation

Mutation of a float number with a mutation range. This operator will add a random float number within the given range.

Since:
0.1
Version:
0.1 (12-04-00)
Author:
Andreas Rummler

Field Summary
protected  float lowerBound
           
protected  float upperBound
           
 
Fields inherited from class mss.ea.mut.FloatMutation
rand
 
Fields inherited from class mss.ea.mut.ChromosomeMutation
mutationPropability
 
Fields inherited from class mss.ea.core.GeneticOperator
description, ID, name
 
Constructor Summary
FloatRangeMutation()
          Constructor.
FloatRangeMutation(float propability)
          Constructor with mutation propability.
FloatRangeMutation(float propability, float lowerBound, float upperBound)
          Constructor with mutation propability and mutation range.
 
Method Summary
 void mutate(Chromosome cr)
          Performs the mutation.
 
Methods inherited from class mss.ea.core.GeneticOperator
getDescription, getID, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lowerBound

protected float lowerBound

upperBound

protected float upperBound
Constructor Detail

FloatRangeMutation

public FloatRangeMutation()
Constructor. The mutation propability is set to 0.05 and the mutation range is set to [-1.0, 1.0].

FloatRangeMutation

public FloatRangeMutation(float propability)
Constructor with mutation propability. The mutation range is set to [-1.0, 1.0].
Parameters:
propability - mutation propability

FloatRangeMutation

public FloatRangeMutation(float propability,
                          float lowerBound,
                          float upperBound)
Constructor with mutation propability and mutation range. If lowerBound > upperBound, the mutation range is silently set to [-1.0, 1.0].
Parameters:
propability - mutation propability
lowerBound - lower bound of mutation range
upperBound - upper bound of mutation range
Method Detail

mutate

public void mutate(Chromosome cr)
            throws MutationException
Performs the mutation.
Overrides:
mutate in class ChromosomeMutation
Parameters:
cr - chromosome of type FloatChromosome
Throws:
MutationException - thrown, if operator fails

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS