public final class termination extends StaticObject
| Modifier and Type | Method and Description |
|---|---|
static Function<Statistics<?,?>,Boolean> |
Generation(int generation)
Return a termination predicate which returns
false if the
current GA generation is >= as the given generation. |
static <C extends Comparable<? super C>> |
SteadyFitness(int generation)
Create a terminator which returns
false if the fitness
hasn't improved for a given number of generations. |
public static <C extends Comparable<? super C>> Function<Statistics<?,C>,Boolean> SteadyFitness(int generation)
false if the fitness
hasn't improved for a given number of generations.C - the fitness type.generation - the number of generations the fitness don't have been
improved.public static Function<Statistics<?,?>,Boolean> Generation(int generation)
false if the
current GA generation is >= as the given generation.
final GeneticAlgortihm<Float64Gene, Float64> ga = ...
ga.evolve(termination.Generation(100));generation - the maximal GA generation.© 2007-2013 Franz Wilhelmstötter (2013-12-18 20:17)