Interface PopulationCandidates<T>

Type Parameters:
T - the representation of population members
All Superinterfaces:
PopulationFitnessVector
All Known Subinterfaces:
PopulationCandidates.DoubleFitness<T>, PopulationCandidates.IntegerFitness<T>

public interface PopulationCandidates<T> extends PopulationFitnessVector
An interface to the candidates for the next generation's population, consisting of the current population as well as the relevant pool of children.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    An interface to the candidates for the next generation's population, consisting of the current population as well as the relevant pool of children.
    static interface 
    An interface to the candidates for the next generation's population, consisting of the current population as well as the relevant pool of children.
  • Method Summary

    Modifier and Type
    Method
    Description
    candidate(int i)
    Accesses the i-th candidate.

    Methods inherited from interface PopulationFitnessVector

    size
  • Method Details

    • candidate

      T candidate(int i)
      Accesses the i-th candidate. Implementations of ReplacementStrategy must not mutate the state of the candidate here. By the time they get to this point, the candidates have already been crossed, mutated, etc as necessary, and fitness has already been computed. If you change the state of a candidate here, the behavior of the evolutionary algorithm may be unexpected. Deliberately not returning an independent copy since some representations may be large and complex.
      Parameters:
      i - the index of the candidate, which begins at 0
      Returns:
      the i-th candidate
      Throws:
      IndexOutOfBoundsException - if i is negative or if i is greater than or equal to size()