Class DifferentialEvolutionSelection

java.lang.Object
org.moeaframework.core.selection.DifferentialEvolutionSelection
All Implemented Interfaces:
Selection

public class DifferentialEvolutionSelection extends Object implements Selection
Selection operator to be used in conjunction with the DifferentialEvolutionVariation operator. The select method returns the solutions [currentIndex, r1, r2, ...], where currentIndex is set using the setCurrentIndex(int) method and r1, r2, ... are randomly selected solutions. The returned solutions are guaranteed to have unique indices in the population, but the solutions themselves may not be unique if the population contains duplicate solutions.
  • Constructor Details

    • DifferentialEvolutionSelection

      public DifferentialEvolutionSelection()
      Constructs a differential evolution selection operator.
  • Method Details

    • setCurrentIndex

      public void setCurrentIndex(int currentIndex)
      Sets the current index, which is the index of the first solution returned by the select method. If set to -1, then the current index is randomly assigned each time select(int, Population) is invoked.
      Parameters:
      currentIndex - the current index
    • select

      public Solution[] select(int arity, Population population)
      Description copied from interface: Selection
      Returns an array of length arity of solutions selected from the specified population.
      Specified by:
      select in interface Selection
      Parameters:
      arity - the number of solutions selected from the specified population
      population - the population from which solutions are selected
      Returns:
      an array of length arity of solutions selected from the specified population