Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core.terminate
Class BestWorstScoreCondition

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

public class BestWorstScoreCondition
extends ScoreComparingCondition

Best-Worst condition. This condition is fulfilled if the difference between the best and the worst score in an induividual falls below a certain value.

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

Field Summary
protected  double threshold
          Threshold.
 
Fields inherited from class org.evolvica.core.terminate.ScoreComparingCondition
comparator
 
Constructor Summary
BestWorstScoreCondition()
          Constructor.
BestWorstScoreCondition(double threshold, IScoreComparator comparator)
          Constructor.
 
Method Summary
 double getThreshold()
          Returns the threshold.
 boolean isTrue(IIndividualSet iset)
          Checks if this condition is true for the given individual set.
 void setThreshold(double d)
          Sets the threshold.
 
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

threshold

protected double threshold
Threshold.

Constructor Detail

BestWorstScoreCondition

public BestWorstScoreCondition()
Constructor.


BestWorstScoreCondition

public BestWorstScoreCondition(double threshold,
                               IScoreComparator comparator)
Constructor.

Parameters:
threshold - threshold
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)

getThreshold

public double getThreshold()
Returns the threshold.

Returns:
threshold

setThreshold

public void setThreshold(double d)
Sets the threshold.

Parameters:
d - threshold

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

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