Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)

org.uncommons.watchmaker.framework.termination
Class GenerationCount

java.lang.Object
  extended by org.uncommons.watchmaker.framework.termination.GenerationCount
All Implemented Interfaces:
TerminationCondition

public class GenerationCount
extends Object
implements TerminationCondition

Terminates evolution after a set number of generations have passed.

Author:
Daniel Dyer

Constructor Summary
GenerationCount(int generationCount)
           
 
Method Summary
 boolean shouldTerminate(PopulationData<?> populationData)
          The condition is queried via this method to determine whether or not evolution should finish at the current point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenerationCount

public GenerationCount(int generationCount)
Parameters:
generationCount - The maximum number of generations that the evolutionary algorithm will permit before terminating.
Method Detail

shouldTerminate

public boolean shouldTerminate(PopulationData<?> populationData)
The condition is queried via this method to determine whether or not evolution should finish at the current point.

Specified by:
shouldTerminate in interface TerminationCondition
Parameters:
populationData - Information about the current state of evolution. This may be used to determine whether evolution should continue or not.
Returns:
true if evolution should be terminated, false otherwise.

Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)