Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.mutate.iarray
Class SubstitutionMutator

java.lang.Object
  extended byorg.evolvica.engine.AbstractOperator
      extended byorg.evolvica.core.common.AbstractGeneticOperator
          extended byorg.evolvica.core.mutate.AbstractMutator
              extended byorg.evolvica.core.mutate.iarray.IntegerArrayMutator
                  extended byorg.evolvica.core.mutate.iarray.SubstitutionMutator
All Implemented Interfaces:
IGeneticOperator, IOperator, IProcessor, java.io.Serializable

public class SubstitutionMutator
extends IntegerArrayMutator

Substitution mutation of an array. This operator will replace random elements with elements selected randomly from a given substitution list.

Since:
0.4.0
Version:
$Revision: 1.8 $ $Date: 2004/05/26 11:58:10 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
protected  int[] integerSubstitutionList
          Substitution list helper.
protected  java.lang.Object[] substitutionList
          Substitution list.
protected  int substNumber
          Number of substitutions.
protected  float substPercentage
          Number of substitutions (percentage).
 
Fields inherited from class org.evolvica.core.mutate.AbstractMutator
propability
 
Fields inherited from class org.evolvica.engine.AbstractOperator
descriptor, element, id, name
 
Constructor Summary
SubstitutionMutator()
          Constructor.
SubstitutionMutator(float percentage, int[] substList)
          Constructor with number of clipped elements.
SubstitutionMutator(int[] substList)
          Constructor.
SubstitutionMutator(int number, int[] substList)
          Constructor with mutation propability and number of clipped elements.
 
Method Summary
 int[] mutate(int[] array)
          Mutates an integer array.
protected  int[] setupSubstArray(java.lang.Object o, int arrayLength)
          Setup substitution.
 
Methods inherited from class org.evolvica.core.mutate.iarray.IntegerArrayMutator
mutate
 
Methods inherited from class org.evolvica.core.mutate.AbstractMutator
getPropability, process, setPropability
 
Methods inherited from class org.evolvica.engine.AbstractOperator
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.evolvica.engine.IOperator
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName
 

Field Detail

substitutionList

protected java.lang.Object[] substitutionList
Substitution list.


substNumber

protected int substNumber
Number of substitutions.


substPercentage

protected float substPercentage
Number of substitutions (percentage).


integerSubstitutionList

protected int[] integerSubstitutionList
Substitution list helper.

Constructor Detail

SubstitutionMutator

public SubstitutionMutator()
Constructor.


SubstitutionMutator

public SubstitutionMutator(int[] substList)
Constructor. The mutation propability is set to 0.05.

Parameters:
substList - array with objects for substitution

SubstitutionMutator

public SubstitutionMutator(float percentage,
                           int[] substList)
Constructor with number of clipped elements.

Parameters:
percentage - percentage value of the number of elements to be clipped
substList - array with objects for substitution

SubstitutionMutator

public SubstitutionMutator(int number,
                           int[] substList)
Constructor with mutation propability and number of clipped elements.

Parameters:
number - number of elements to be clipped
substList - array with objects for substitution
Method Detail

mutate

public int[] mutate(int[] array)
Description copied from class: IntegerArrayMutator
Mutates an integer array.

Specified by:
mutate in class IntegerArrayMutator
Parameters:
array - integer array to be mutated
Returns:
mutated integer array
See Also:
IntegerArrayMutator.mutate(int[])

setupSubstArray

protected int[] setupSubstArray(java.lang.Object o,
                                int arrayLength)
Setup substitution.

Parameters:
o - object
arrayLength - substitution array
Returns:
mutated array

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems