|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.evolvica.core.terminate.ScoreComparingCondition
org.evolvica.core.terminate.RunningBestScoreCondition
Termination dependent on the running best score. The termination condition is fulfilled, if current best score - average value of best scores of last n generations falls under a particular threshold.
Field Summary | |
protected int |
nextIndex
Next index. |
protected double[] |
stack
Stack. |
protected boolean |
stackFull
Indicator if stack is full. |
protected double |
threshold
Threshold. |
Fields inherited from class org.evolvica.core.terminate.ScoreComparingCondition |
comparator |
Constructor Summary | |
RunningBestScoreCondition()
Constructor. |
|
RunningBestScoreCondition(double threshold,
int generations,
IScoreComparator comparator)
Constructor. |
Method Summary | |
int |
getGenerations()
Returns the number of generations. |
double |
getThreshold()
Returns the threshold. |
boolean |
isTrue(IIndividualSet iset)
Checks if this condition is true for the given individual set. |
void |
setGenerations(int i)
Sets the number of generations. |
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 |
protected double threshold
protected double[] stack
protected int nextIndex
protected boolean stackFull
Constructor Detail |
public RunningBestScoreCondition()
public RunningBestScoreCondition(double threshold, int generations, IScoreComparator comparator)
threshold
- thresholdgenerations
- generationscomparator
- score comparatorMethod Detail |
public boolean isTrue(IIndividualSet iset)
ICondition
iset
- individual set to check for the truth of the condition
ICondition.isTrue(org.evolvica.core.IIndividualSet)
public int getGenerations()
public double getThreshold()
public void setGenerations(int i)
i
- number of generationspublic void setThreshold(double d)
d
- threshold
|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |