Top Description Methods
org.apache.commons.math3.genetics

public Interface Population

extends Iterable<Chromosome>
Known Direct Implementers
org.apache.commons.math3.genetics.ListPopulation
Imports
org.apache.commons.math3.exception.NumberIsTooLargeException

A collection of chromosomes that facilitates generational evolution.
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public void
addChromosome(Chromosome
the chromosome to add.
chromosome
)

Add the given chromosome to the population.

public Chromosome

Returns:

the fittest chromosome.
getFittestChromosome
()

Access the fittest chromosome in this population.

public int

Returns:

the maximum population size.
getPopulationLimit
()

Access the maximum population size.

public int

Returns:

the current population size.
getPopulationSize
()

Access the current population size.

public Population

Returns:

the beginnings of the next generation.
nextGeneration
()

Start the population for the next generation.

Inherited from java.lang.Iterable:
forEachiteratorspliterator

Method Detail

addChromosomeback to summary
public void addChromosome(Chromosome chromosome) throws NumberIsTooLargeException

Add the given chromosome to the population.

Parameters
chromosome:Chromosome

the chromosome to add.

Exceptions
NumberIsTooLargeException:
if the population would exceed the population limit when adding this chromosome
getFittestChromosomeback to summary
public Chromosome getFittestChromosome()

Access the fittest chromosome in this population.

Returns:Chromosome

the fittest chromosome.

getPopulationLimitback to summary
public int getPopulationLimit()

Access the maximum population size.

Returns:int

the maximum population size.

getPopulationSizeback to summary
public int getPopulationSize()

Access the current population size.

Returns:int

the current population size.

nextGenerationback to summary
public Population nextGeneration()

Start the population for the next generation.

Returns:Population

the beginnings of the next generation.