geneticWedge.gp
Class StoppingCriterion

java.lang.Object
  extended by geneticWedge.gp.StoppingCriterion
Direct Known Subclasses:
EvaluativeStoppingCriterion, FixedGenerationsStoppingCriterion

public abstract class StoppingCriterion
extends java.lang.Object

A StoppingCriterion determines when evolution will stop. Differnet StoppingCriteria may perform evolution for a fixed number of generations or implement some form of early stopping.


Constructor Summary
StoppingCriterion()
           
 
Method Summary
 boolean stopIfNoDiversity()
          Returns stopOnZeroDiversity.
 void stopIfNoDiversity(boolean stop)
          If true, evolution will stop prematurely once there is no diversity in the Population (all Individuals are identical).
abstract  boolean stopReached(AbstractPopulation pop)
          Absract method that must be implmented by non-absract subclasses.
abstract  java.lang.String toString()
          Returns a String represnetation of this StoppingCriterion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoppingCriterion

public StoppingCriterion()
Method Detail

stopIfNoDiversity

public void stopIfNoDiversity(boolean stop)
If true, evolution will stop prematurely once there is no diversity in the Population (all Individuals are identical). By default this parameter is false.


stopIfNoDiversity

public boolean stopIfNoDiversity()
Returns stopOnZeroDiversity. If true, evolution will stop prematurely once there is no diversity in the Population (all Individuals are identical). By default this parameter is false.


stopReached

public abstract boolean stopReached(AbstractPopulation pop)
Absract method that must be implmented by non-absract subclasses. Should return true if the stopping condition has been met.


toString

public abstract java.lang.String toString()
Returns a String represnetation of this StoppingCriterion.

Overrides:
toString in class java.lang.Object