Class EvolutionListenerLogTopN<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.core.evolutionlisteners.EvolutionListenerLogTopN<T>
- All Implemented Interfaces:
EvolutionListener<T>
public class EvolutionListenerLogTopN<T extends Comparable<T>>
extends Object
implements EvolutionListener<T>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Comparator
<T> private final org.apache.logging.log4j.Logger
private final int
private final int
-
Constructor Summary
ConstructorDescriptionEvolutionListenerLogTopN
(org.apache.logging.log4j.Logger _logger, int _topN, int _skipN) EvolutionListenerLogTopN
(org.apache.logging.log4j.Logger _logger, int _topN, int _skipN, Comparator<T> _comparator, Function<Genotype, String> _prettyPrinter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onEvolution
(long generation, List<Genotype> population, List<T> fitness, boolean isDone)
-
Field Details
-
logger
private final org.apache.logging.log4j.Logger logger -
topN
private final int topN -
skipN
private final int skipN -
comparator
-
prettyPrinter
-
-
Constructor Details
-
EvolutionListenerLogTopN
public EvolutionListenerLogTopN(org.apache.logging.log4j.Logger _logger, int _topN, int _skipN, Comparator<T> _comparator, Function<Genotype, String> _prettyPrinter) -
EvolutionListenerLogTopN
public EvolutionListenerLogTopN(org.apache.logging.log4j.Logger _logger, int _topN, int _skipN)
-
-
Method Details
-
onEvolution
public void onEvolution(long generation, List<Genotype> population, List<T> fitness, boolean isDone) - Specified by:
onEvolution
in interfaceEvolutionListener<T extends Comparable<T>>
-