eaLib API Docs
Last Modified : January 7 2002

mss.ea.trm
Class RelativeErrorStreamCondition

java.lang.Object
  |
  +--mss.ea.trm.AbstractStreamCondition
        |
        +--mss.ea.trm.ScoreStreamCondition
              |
              +--mss.ea.trm.RelativeErrorStreamCondition
All Implemented Interfaces:
StreamCondition

public class RelativeErrorStreamCondition
extends ScoreStreamCondition

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.1
Version:
0.1 (08-21-2001)
Author:
Andreas Rummler

Field Summary
protected  double doubleTarget
          Target (double).
protected  float floatTarget
          Target (float).
protected  int intTarget
          Target (int).
protected  long longTarget
          Target (long).
protected  float targetError
          Relative error.
 
Fields inherited from class mss.ea.trm.ScoreStreamCondition
DOUBLE, FLOAT, INT, LONG, mode, NONE
 
Fields inherited from class mss.ea.trm.AbstractStreamCondition
comp
 
Constructor Summary
RelativeErrorStreamCondition(double target, float targetError)
          Constructor (mode double).
RelativeErrorStreamCondition(float target, float targetError)
          Constructor (mode float).
RelativeErrorStreamCondition(int target, float targetError)
          Constructor (mode int).
RelativeErrorStreamCondition(long target, float targetError)
          Constructor (mode long).
 
Method Summary
 boolean isTrue(IndividualStream is)
          Test of break condition.
 
Methods inherited from class mss.ea.trm.AbstractStreamCondition
getComparator, setComparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doubleTarget

protected double doubleTarget
Target (double).

floatTarget

protected float floatTarget
Target (float).

intTarget

protected int intTarget
Target (int).

longTarget

protected long longTarget
Target (long).

targetError

protected float targetError
Relative error. This is used in all four modes, the range of values should be adequate.
Constructor Detail

RelativeErrorStreamCondition

public RelativeErrorStreamCondition(double target,
                                    float targetError)
Constructor (mode double).
Parameters:
target - target value (double)
targetError - relative error to target value (double)

RelativeErrorStreamCondition

public RelativeErrorStreamCondition(float target,
                                    float targetError)
Constructor (mode float).
Parameters:
target - target value (float)
targetError - relative error to target value (float)

RelativeErrorStreamCondition

public RelativeErrorStreamCondition(int target,
                                    float targetError)
Constructor (mode int).
Parameters:
target - target value (int)
targetError - relative error to target value (int)

RelativeErrorStreamCondition

public RelativeErrorStreamCondition(long target,
                                    float targetError)
Constructor (mode long).
Parameters:
target - target value (long)
targetError - relative error to target value (long)
Method Detail

isTrue

public boolean isTrue(IndividualStream is)
Test of break condition.
Overrides:
isTrue in class AbstractStreamCondition
Returns:
result of test of break condition.

eaLib API Docs
Last Modified : January 7 2002

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