public class FixedGenerationCount extends java.lang.Object implements StoppingCondition
isSatisfied(Population)
is invoked, a generation counter is
incremented. Once the counter reaches the configured
maxGenerations
value, isSatisfied(Population)
returns
true.Constructor and Description |
---|
FixedGenerationCount(int maxGenerations)
Create a new FixedGenerationCount instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getNumGenerations() |
boolean |
isSatisfied(Population population)
Determine whether or not the given number of generations have passed.
|
public FixedGenerationCount(int maxGenerations)
maxGenerations
- number of generations to evolvepublic boolean isSatisfied(Population population)
isSatisfied
in interface StoppingCondition
population
- ignored (no impact on result)true
IFF the maximum number of generations has been exceededpublic int getNumGenerations()
Copyright © 2010 - 2020 Adobe. All Rights Reserved