Interface ReplacementStrategy.Replacements

Enclosing interface:
ReplacementStrategy<T>

public static interface ReplacementStrategy.Replacements
Interface for ReplacementStrategy implementations to specify which members of the parent and child populations serve as replacements into the next generation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    chooseFromChildPopulation(int i, int count)
    Add the i-th member of the parent population to the set of replacements.
    void
    chooseFromParentPopulation(int i, int count)
    Add the i-th member of the parent population to the set of replacements.
  • Method Details

    • chooseFromParentPopulation

      void chooseFromParentPopulation(int i, int count)
      Add the i-th member of the parent population to the set of replacements.
      Parameters:
      i - index of the population member
      count - the number of copies to add
    • chooseFromChildPopulation

      void chooseFromChildPopulation(int i, int count)
      Add the i-th member of the parent population to the set of replacements.
      Parameters:
      i - index of the population member
      count - the number of copies to add