Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.terminate
Class RelativeErrorCondition

java.lang.Object
  extended byorg.evolvica.core.terminate.ScoreComparingCondition
      extended byorg.evolvica.core.terminate.RelativeErrorCondition
All Implemented Interfaces:
ICondition

public class RelativeErrorCondition
extends ScoreComparingCondition

Termination at an relative error to the target value. The break condition is fulfilled in case that current relative error < given relative error. The relative error is calculated as: Abs( targetValue - bestScore) / targetValue ). Note that the calculation fails, if the target value is 0.0.

Since:
0.4.0
Version:
$Revision: 1.6 $ $Date: 2004/05/26 11:58:19 $
Author:
Andreas Rummler

Field Summary
protected  double target
          Target value.
protected  double targetError
          Target error.
 
Fields inherited from class org.evolvica.core.terminate.ScoreComparingCondition
comparator
 
Constructor Summary
RelativeErrorCondition()
          Constructor.
RelativeErrorCondition(double target, double targetError, IScoreComparator comparator)
          Constructor.
 
Method Summary
 double getTarget()
          Returns the target value.
 double getTargetError()
          Returns the target error.
 boolean isTrue(IIndividualSet iset)
          Checks if this condition is true for the given individual set.
 void setTarget(double d)
          Sets the target value.
 void setTargetError(double d)
          Stes the target error.
 
Methods inherited from class org.evolvica.core.terminate.ScoreComparingCondition
getComparator, setComparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected double target
Target value.


targetError

protected double targetError
Target error.

Constructor Detail

RelativeErrorCondition

public RelativeErrorCondition()
Constructor.


RelativeErrorCondition

public RelativeErrorCondition(double target,
                              double targetError,
                              IScoreComparator comparator)
Constructor.

Parameters:
target - target value
targetError - target error
comparator - score comparator
Method Detail

isTrue

public boolean isTrue(IIndividualSet iset)
Description copied from interface: ICondition
Checks if this condition is true for the given individual set.

Parameters:
iset - individual set to check for the truth of the condition
Returns:
true if the condition is fulfilled, false otherwise
See Also:
ICondition.isTrue(org.evolvica.core.IIndividualSet)

getTarget

public double getTarget()
Returns the target value.

Returns:
target value

getTargetError

public double getTargetError()
Returns the target error.

Returns:
target error

setTarget

public void setTarget(double d)
Sets the target value.

Parameters:
d - target value

setTargetError

public void setTargetError(double d)
Stes the target error.

Parameters:
d - target error

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

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