Class SPEA2ReplacementStrategyImplementor<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.moo.spea2.replacement.SPEA2ReplacementStrategyImplementor<T>
- All Implemented Interfaces:
ReplacementStrategyImplementor<T>
public class SPEA2ReplacementStrategyImplementor<T extends Comparable<T>>
extends Object
implements ReplacementStrategyImplementor<T>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.apache.logging.log4j.Logger
private final SPEA2Replacement
<T> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncomputeAdditionalIndividuals
(Set<Integer> selectedIndex, double[] rawFitness, Population<T> population, int numIndividuals) protected double[]
computeDensity
(List<List<org.apache.commons.lang3.tuple.Pair<Integer, Double>>> distances, int k, Population<T> population) protected double[]
computeFinalFitness
(double[] rawFitness, double[] density, Population<T> population) protected double[][]
computeObjectiveDistances
(BiFunction<T, T, Double> distance, Population<T> population) protected double[]
computeRawFitness
(Comparator<T> dominance, double[] strengths, Population<T> population) computeSortedDistances
(double[][] distanceObjectives, Population<T> population) protected double[]
computeStrength
(Comparator<T> dominance, Population<T> population) environmentalSelection
(List<List<org.apache.commons.lang3.tuple.Pair<Integer, Double>>> distances, double[] rawFitness, double[] finalFitness, Population<T> population, int numIndividuals) select
(AbstractEAConfiguration<T> eaConfiguration, int numIndividuals, List<Genotype> population, List<T> populationScores, List<Genotype> offsprings, List<T> offspringScores) protected int
protected void
truncatePopulation
(List<List<org.apache.commons.lang3.tuple.Pair<Integer, Double>>> distances, Population<T> population, int numIndividuals, Set<Integer> selectedIndex)
-
Field Details
-
logger
public static final org.apache.logging.log4j.Logger logger -
spea2Replacement
-
-
Constructor Details
-
SPEA2ReplacementStrategyImplementor
-
-
Method Details
-
computeStrength
-
computeObjectiveDistances
protected double[][] computeObjectiveDistances(BiFunction<T, T, Double> distance, Population<T> population) -
computeRawFitness
protected double[] computeRawFitness(Comparator<T> dominance, double[] strengths, Population<T> population) -
computeSortedDistances
-
computeDensity
-
computeFinalFitness
protected double[] computeFinalFitness(double[] rawFitness, double[] density, Population<T> population) -
skipNull
-
computeAdditionalIndividuals
-
truncatePopulation
-
environmentalSelection
-
select
public Population<T> select(AbstractEAConfiguration<T> eaConfiguration, int numIndividuals, List<Genotype> population, List<T> populationScores, List<Genotype> offsprings, List<T> offspringScores) - Specified by:
select
in interfaceReplacementStrategyImplementor<T extends Comparable<T>>
-