public interface Population extends Iterable<Chromosome>
Modifier and Type | Method and Description |
---|---|
void |
addChromosome(Chromosome chromosome)
Add the given chromosome to the population.
|
Chromosome |
getFittestChromosome()
Access the fittest chromosome in this population.
|
int |
getPopulationLimit()
Access the maximum population size.
|
int |
getPopulationSize()
Access the current population size.
|
Population |
nextGeneration()
Start the population for the next generation.
|
forEach, iterator, spliterator
int getPopulationSize()
int getPopulationLimit()
Population nextGeneration()
void addChromosome(Chromosome chromosome) throws MathIllegalArgumentException
chromosome
- the chromosome to add.MathIllegalArgumentException
- if the population would exceed the population limit when adding
this chromosomeChromosome getFittestChromosome()
Copyright © 2016 Hipparchus.org. All rights reserved.