Interface PopulationCandidates<T>
- Type Parameters:
T- the representation of population members
- All Superinterfaces:
PopulationFitnessVector
- All Known Subinterfaces:
PopulationCandidates.DoubleFitness<T>, PopulationCandidates.IntegerFitness<T>
An interface to candidates for the next generation's population, which can be the current members
of the population or the children derived from it, depending upon the context. This interface is
used as a parameter to the
ReplacementStrategy interface.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAn interface to the candidates for the next generation's population, which can be the current members of the population or the children derived from it, depending upon the context.static interfaceAn interface to the candidates for the next generation's population, which can be the current members of the population or the children derived from it, depending upon the context. -
Method Summary
Methods inherited from interface PopulationFitnessVector
fitnessAsDouble, size
-
Method Details
-
candidate
Accesses the i-th candidate. Implementations ofReplacementStrategymust 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()
-