Package org.apache.commons.math.genetics
Interface Population
- 
- All Superinterfaces:
 java.lang.Iterable<Chromosome>
- All Known Implementing Classes:
 ElitisticListPopulation,ListPopulation
public interface Population extends java.lang.Iterable<Chromosome>
A collection of chromosomes that facilitates generational evolution.- Since:
 - 2.0
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChromosome(Chromosome chromosome)Add the given chromosome to the population.ChromosomegetFittestChromosome()Access the fittest chromosome in this population.intgetPopulationLimit()Access the maximum population size.intgetPopulationSize()Access the current population size.PopulationnextGeneration()Start the population for the next generation. 
 - 
 
- 
- 
Method Detail
- 
getPopulationSize
int getPopulationSize()
Access the current population size.- Returns:
 - the current population size.
 
 
- 
getPopulationLimit
int getPopulationLimit()
Access the maximum population size.- Returns:
 - the maximum population size.
 
 
- 
nextGeneration
Population nextGeneration()
Start the population for the next generation.- Returns:
 - the beginnings of the next generation.
 
 
- 
addChromosome
void addChromosome(Chromosome chromosome)
Add the given chromosome to the population.- Parameters:
 chromosome- the chromosome to add.
 
- 
getFittestChromosome
Chromosome getFittestChromosome()
Access the fittest chromosome in this population.- Returns:
 - the fittest chromosome.
 
 
 - 
 
 -