public static class GAStoppingCriteria.MaximumGeneration extends Object implements GAStoppingCriteria
GeneticAlgorithm to stop after n generations
Useful for pausing and seeing what the
state of the algorithm is at any particular time and possibly changing
parameters etc before calling the run() method of the
GeneticAlgorithm again.GAStoppingCriteria.MaximumGeneration| Constructor and Description |
|---|
MaximumGeneration(int maxGenerations)
Public Constructer
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxGenerations() |
boolean |
stop(GeneticAlgorithm ga)
Stops the Algorithm if the iterations are >=
maxGenerations |
public MaximumGeneration(int maxGenerations)
maxGenerations - the number of generations to stop afterpublic boolean stop(GeneticAlgorithm ga)
maxGenerationsstop in interface GAStoppingCriteriaga - the genetic algorithm to assess for stoppingga should stoppublic int getMaxGenerations()
Copyright © 2020 BioJava. All rights reserved.