Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.mutate.Long
Class StepMutator

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.Long.LongMutator
                  extended byorg.evolvica.core.mutate.Long.StepMutator
All Implemented Interfaces:
IGeneticOperator, IOperator, IProcessor, java.io.Serializable

public class StepMutator
extends LongMutator

Mutation of an long number with a maximal stepsize. This operator will add a random long number within the range from 0 to a given long number. The given number can be either positive or negative.
The mutated value = value + random( 0, stepSize )

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

Field Summary
protected  long stepSize
          Mutation step size.
 
Fields inherited from class org.evolvica.core.mutate.AbstractMutator
propability
 
Fields inherited from class org.evolvica.engine.AbstractOperator
descriptor, element, id, name
 
Constructor Summary
StepMutator()
          Constructor.
StepMutator(long stepSize)
          Constructor with mutation step size.
 
Method Summary
 long getStepSize()
          Returns the step size.
 long mutate(long value)
          Mutates a long value.
 void setStepSize(long i)
          Sets a new value for the step size.
 
Methods inherited from class org.evolvica.core.mutate.Long.LongMutator
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

stepSize

protected long stepSize
Mutation step size.

Constructor Detail

StepMutator

public StepMutator()
Constructor. The mutation step size is set to 10.


StepMutator

public StepMutator(long stepSize)
Constructor with mutation step size.

Parameters:
stepSize - mutation step size
Method Detail

mutate

public long mutate(long value)
Description copied from class: LongMutator
Mutates a long value.

Specified by:
mutate in class LongMutator
Parameters:
value - the value to be mutated
Returns:
the mutated value
See Also:
LongMutator.mutate(long)

getStepSize

public long getStepSize()
Returns the step size.

Returns:
step size

setStepSize

public void setStepSize(long i)
Sets a new value for the step size.

Parameters:
i - new value for the step size

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

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