isSatisfied(Population) is invoked, a generation
counter is incremented. Once the counter reaches the configured maxGenerations value,
isSatisfied(Population) returns true.
| Modifier and Type | Field and Description |
|---|---|
| private final int | maxGenerations
Maximum number of generations (stopping criteria) |
| private int | numGenerations
Number of generations that have passed |
| Access | Constructor and Description |
|---|---|
| public | FixedGenerationCount(final int
number of generations to evolve maxGenerations)Create a new FixedGenerationCount instance. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the number of generations that have passedReturns the number of generations that have already passed. |
| public boolean | Returns: true IFF the maximum number of generations has been exceededignored (no impact on result) population)Implements org. Determine whether or not the given number of generations have passed. |
| maxGenerations | back to summary |
|---|---|
| private final int maxGenerations Maximum number of generations (stopping criteria) | |
| numGenerations | back to summary |
|---|---|
| private int numGenerations Number of generations that have passed | |
| FixedGenerationCount | back to summary |
|---|---|
| public FixedGenerationCount(final int maxGenerations) throws NumberIsTooSmallException Create a new FixedGenerationCount instance.
| |
| getNumGenerations | back to summary |
|---|---|
| public int getNumGenerations() Returns the number of generations that have already passed.
| |
| isSatisfied | back to summary |
|---|---|
| public boolean isSatisfied(final Population population) Implements org. Determine whether or not the given number of generations have passed. Increments the number of generations counter if the maximum has not been reached.
| |