Class NSGA2Selector<T extends Comparable<T>>

java.lang.Object
net.bmahe.genetics4j.moo.nsga2.impl.NSGA2Selector<T>
All Implemented Interfaces:
Selector<T>

public class NSGA2Selector<T extends Comparable<T>> extends Object implements Selector<T>
  • Field Details

    • logger

      public static final org.apache.logging.log4j.Logger logger
    • nsga2Selection

      private final NSGA2Selection<T extends Comparable<T>> nsga2Selection
  • Constructor Details

  • Method Details

    • select

      public Population<T> select(AbstractEAConfiguration<T> eaConfiguration, int numIndividuals, List<Genotype> population, List<T> fitnessScore)
      Description copied from interface: Selector
      Selects a specified number of individuals from the given population based on their fitness values.

      This method implements the core selection logic, choosing individuals according to the specific selection strategy. The selection process typically involves evaluating fitness values and applying probabilistic or deterministic rules to choose parents for reproduction.

      The selection process should:

      • Consider fitness values when making selection decisions
      • Return exactly the requested number of individuals
      • Allow for the possibility of selecting the same individual multiple times
      • Maintain the integrity of the original population
      Specified by:
      select in interface Selector<T extends Comparable<T>>
      Parameters:
      eaConfiguration - the evolutionary algorithm configuration containing selection parameters
      numIndividuals - the number of individuals to select from the population
      population - the list of genotypes in the current population
      fitnessScore - the list of fitness values corresponding to each genotype
      Returns:
      a new population containing the selected individuals