public class ElapsedTime extends Object implements TerminationCondition
Constructor and Description |
---|
ElapsedTime(long maxDuration) |
Modifier and Type | Method and Description |
---|---|
boolean |
shouldTerminate(PopulationData<?> populationData)
The condition is queried via this method to determine whether or not evolution
should finish at the current point.
|
public ElapsedTime(long maxDuration)
maxDuration
- The maximum period of time (in milliseconds) before
evolution will be terminated.public boolean shouldTerminate(PopulationData<?> populationData)
shouldTerminate
in interface TerminationCondition
populationData
- Information about the current state of evolution. This may
be used to determine whether evolution should continue or not.