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 GeneticAlgorithm<DoubleGene, Double> ga = ...
ga.evolve(termination.Generation(100));
generation
- the maximal GA generation.© 2007-2014 Franz Wilhelmstötter (2014-03-07 19:35)