geneticWedge.gp
Class FixedGenerationsStoppingCriterion

java.lang.Object
  extended by geneticWedge.gp.StoppingCriterion
      extended by geneticWedge.gp.FixedGenerationsStoppingCriterion

public class FixedGenerationsStoppingCriterion
extends StoppingCriterion

If a FixedGenerationsStoppingCriterion is used, early stopping will not occur.


Constructor Summary
FixedGenerationsStoppingCriterion(int noOfGenerations)
          Default constructor sets the number of generations for which to evolve.
 
Method Summary
 boolean stopReached(AbstractPopulation pop)
          Returns true if the required number of generations of evolution have occurred.
 java.lang.String toString()
          Returns a String representation of this FixedGenerationsStopping Criterion.
 
Methods inherited from class geneticWedge.gp.StoppingCriterion
stopIfNoDiversity, stopIfNoDiversity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FixedGenerationsStoppingCriterion

public FixedGenerationsStoppingCriterion(int noOfGenerations)
Default constructor sets the number of generations for which to evolve. A generation is considered to have passed when the number of new offspring created equals the inital population size.

Method Detail

stopReached

public boolean stopReached(AbstractPopulation pop)
Returns true if the required number of generations of evolution have occurred.

Specified by:
stopReached in class StoppingCriterion

toString

public java.lang.String toString()
Returns a String representation of this FixedGenerationsStopping Criterion. This is useful for generating results files containing information about a GP run.

Specified by:
toString in class StoppingCriterion