Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.mutate.Long
Class AbsoluteRangeMutator

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.AbsoluteRangeMutator
All Implemented Interfaces:
IGeneticOperator, IOperator, IProcessor, java.io.Serializable

public class AbsoluteRangeMutator
extends LongMutator

Mutation of a long number with a mutation range. This operator will add a random long number within the given range.
The mutated value = value +/- random( lowerBound, upperBound )

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

Field Summary
protected  long lowerBound
          Lower mutation bound.
protected  long upperBound
          Upper mutation bound.
 
Fields inherited from class org.evolvica.core.mutate.AbstractMutator
propability
 
Fields inherited from class org.evolvica.engine.AbstractOperator
descriptor, element, id, name
 
Constructor Summary
AbsoluteRangeMutator()
          Constructor.
AbsoluteRangeMutator(long lowerBound, long upperBound)
          Constructor with mutation range.
 
Method Summary
 long getLowerBound()
          Returns the lower bound.
 long getUpperBound()
          Returns the upper bound.
 long mutate(long value)
          Mutates a long value.
 void setLowerBound(long i)
          Sets a new lower bound.
 void setUpperBound(long i)
          Sets a new upper bound.
 
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

lowerBound

protected long lowerBound
Lower mutation bound.


upperBound

protected long upperBound
Upper mutation bound.

Constructor Detail

AbsoluteRangeMutator

public AbsoluteRangeMutator()
Constructor.


AbsoluteRangeMutator

public AbsoluteRangeMutator(long lowerBound,
                            long upperBound)
Constructor with mutation range.

Parameters:
lowerBound - lower bound of mutation range
upperBound - upper bound of mutation range
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)

getLowerBound

public long getLowerBound()
Returns the lower bound.

Returns:
the lower bound

getUpperBound

public long getUpperBound()
Returns the upper bound.

Returns:
the upper bound

setLowerBound

public void setLowerBound(long i)
Sets a new lower bound.

Parameters:
i - new value for the lower bound

setUpperBound

public void setUpperBound(long i)
Sets a new upper bound.

Parameters:
i - new value for the upper bound

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

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