|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.math3.genetics.FixedGenerationCount
public class FixedGenerationCount
Stops after a fixed number of generations. Each time isSatisfied(Population)
is invoked, a generation
counter is incremented. Once the counter reaches the configured maxGenerations
value,
isSatisfied(Population)
returns true.
Constructor Summary | |
---|---|
FixedGenerationCount(int maxGenerations)
Create a new FixedGenerationCount instance. |
Method Summary | |
---|---|
int |
getNumGenerations()
Returns the number of generations that have already passed. |
boolean |
isSatisfied(Population population)
Determine whether or not the given number of generations have passed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedGenerationCount(int maxGenerations) throws NumberIsTooSmallException
maxGenerations
- number of generations to evolve
NumberIsTooSmallException
- if the number of generations is < 1Method Detail |
---|
public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |