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 |
---|
GAStoppingCriteria.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 GAStoppingCriteria.MaximumGeneration(int maxGenerations)
maxGenerations
- the number of generations to stop afterpublic boolean stop(GeneticAlgorithm ga)
maxGenerations
stop
in interface GAStoppingCriteria
ga
- the genetic algorithm to assess for stoppingga
should stoppublic int getMaxGenerations()
Copyright © 2014 BioJava. All rights reserved.