eaLib API Docs
Last Modified : January 7 2002

mss.ea.mut
Class ScrambleListMutation

java.lang.Object
  |
  +--mss.ea.core.GeneticOperator
        |
        +--mss.ea.mut.Mutation
              |
              +--mss.ea.mut.ChromosomeMutation
                    |
                    +--mss.ea.mut.ListMutation
                          |
                          +--mss.ea.mut.ScrambleListMutation

public class ScrambleListMutation
extends ListMutation

Scramble mutation of a list. This operator will randomly elements of a list.

Since:
0.1
Version:
0.1 (06-13-2001)
Author:
Andreas Rummler

Field Summary
protected  int scrambleNumber
           
protected  float scramblePercentage
           
 
Fields inherited from class mss.ea.mut.ListMutation
rand
 
Fields inherited from class mss.ea.mut.ChromosomeMutation
mutationPropability
 
Fields inherited from class mss.ea.core.GeneticOperator
description, ID, name
 
Constructor Summary
ScrambleListMutation()
          Constructor.
ScrambleListMutation(float propability)
          Constructor with mutation propability.
ScrambleListMutation(float propability, float percentage)
          Constructor with mutation propability and number of scrambled elements.
ScrambleListMutation(float propability, int number)
          Constructor with mutation propability and number of scrambled elements.
 
Method Summary
 void mutate(ListChromosome cr)
          Performs the mutation.
protected  void scramble(java.util.List l)
           
 
Methods inherited from class mss.ea.mut.ListMutation
mutate
 
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

scrambleNumber

protected int scrambleNumber

scramblePercentage

protected float scramblePercentage
Constructor Detail

ScrambleListMutation

public ScrambleListMutation()
Constructor. The mutation propability is set to 0.05. The length of the reversed section randomly calculated.

ScrambleListMutation

public ScrambleListMutation(float propability)
Constructor with mutation propability. The length of the reversed section randomly calculated.
Parameters:
propability - mutation propability

ScrambleListMutation

public ScrambleListMutation(float propability,
                            float percentage)
Constructor with mutation propability and number of scrambled elements.
Parameters:
propability - mutation propability
percentage - percentage value of the number of elements to be scrambled

ScrambleListMutation

public ScrambleListMutation(float propability,
                            int number)
Constructor with mutation propability and number of scrambled elements.
Parameters:
propability - mutation propability
number - number of elements to be scrambled
Method Detail

mutate

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

scramble

protected void scramble(java.util.List l)

eaLib API Docs
Last Modified : January 7 2002

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