public class ElitisticListPopulation extends ListPopulation
| Constructor and Description |
|---|
ElitisticListPopulation(int populationLimit,
double elitismRate)
Creates a new
ElitisticListPopulation instance and initializes its inner chromosome list. |
ElitisticListPopulation(List<Chromosome> chromosomes,
int populationLimit,
double elitismRate)
Creates a new
ElitisticListPopulation instance. |
| Modifier and Type | Method and Description |
|---|---|
double |
getElitismRate()
Access the elitism rate.
|
Population |
nextGeneration()
Start the population for the next generation.
|
void |
setElitismRate(double elitismRate)
Sets the elitism rate, i.e.
|
addChromosome, addChromosomes, getChromosomeList, getChromosomes, getFittestChromosome, getPopulationLimit, getPopulationSize, iterator, setPopulationLimit, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ElitisticListPopulation(List<Chromosome> chromosomes, int populationLimit, double elitismRate) throws MathIllegalArgumentException, NullArgumentException
ElitisticListPopulation instance.chromosomes - list of chromosomes in the populationpopulationLimit - maximal size of the populationelitismRate - how many best chromosomes will be directly transferred to the next generation [in %]NullArgumentException - if the list of chromosomes is nullMathIllegalArgumentException - if the population limit is not a positive number (< 1)MathIllegalArgumentException - if the list of chromosomes exceeds the population limitMathIllegalArgumentException - if the elitism rate is outside the [0, 1] rangepublic ElitisticListPopulation(int populationLimit,
double elitismRate)
throws MathIllegalArgumentException
ElitisticListPopulation instance and initializes its inner chromosome list.populationLimit - maximal size of the populationelitismRate - how many best chromosomes will be directly transferred to the next generation [in %]MathIllegalArgumentException - if the population limit is not a positive number (< 1)MathIllegalArgumentException - if the elitism rate is outside the [0, 1] rangepublic Population nextGeneration()
elitismRate
percents of the best chromosomes are directly copied to the next generation.public void setElitismRate(double elitismRate)
throws MathIllegalArgumentException
elitismRate - how many best chromosomes will be directly transferred to the next generation [in %]MathIllegalArgumentException - if the elitism rate is outside the [0, 1] rangepublic double getElitismRate()
Copyright © 2016 Hipparchus.org. All rights reserved.