Class DoubleTournamentSelector<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.core.selection.DoubleTournamentSelector<T>
- All Implemented Interfaces:
Selector<T>
public class DoubleTournamentSelector<T extends Comparable<T>>
extends Object
implements Selector<T>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.apache.logging.log4j.Logger
private final RandomGenerator
private final SelectionPolicy
-
Constructor Summary
ConstructorDescriptionDoubleTournamentSelector
(SelectionPolicy _selectionPolicy, RandomGenerator _randomGenerator) -
Method Summary
Modifier and TypeMethodDescriptionprotected Individual
<T> parsimonyPick
(Comparator<Individual<T>> parsimonyComparator, double parsimonyTournamentSize, Individual<T> first, Individual<T> second) protected Individual
<T> randomIndividual
(List<Genotype> population, List<T> fitnessScore) select
(AbstractEAConfiguration<T> eaConfiguration, int numIndividuals, List<Genotype> population, List<T> fitnessScore) protected Individual
<T> selectForFitness
(AbstractEAConfiguration<T> eaConfiguration, Comparator<Individual<T>> fitnessComparator, int numCandidates, List<Genotype> population, List<T> fitnessScore)
-
Field Details
-
logger
public static final org.apache.logging.log4j.Logger logger -
selectionPolicy
-
randomGenerator
-
-
Constructor Details
-
DoubleTournamentSelector
-
-
Method Details
-
randomIndividual
-
selectForFitness
protected Individual<T> selectForFitness(AbstractEAConfiguration<T> eaConfiguration, Comparator<Individual<T>> fitnessComparator, int numCandidates, List<Genotype> population, List<T> fitnessScore) -
parsimonyPick
protected Individual<T> parsimonyPick(Comparator<Individual<T>> parsimonyComparator, double parsimonyTournamentSize, Individual<T> first, Individual<T> second) -
select
public Population<T> select(AbstractEAConfiguration<T> eaConfiguration, int numIndividuals, List<Genotype> population, List<T> fitnessScore) - Specified by:
select
in interfaceSelector<T extends Comparable<T>>
-