#include <Population.h>
Public Member Functions | |
Population (int populationSize, int maximumPopulationSize, Random *random, MultiobjectiveProblem *problem) | |
Constructor. | |
~Population (void) | |
Destructor. | |
int | getPopulationSize () const |
Gets the size of the population. | |
int | getMaximumPopulationSize () const |
Gets the maximum size of the population. | |
Individual * | getIth (int index) const |
Gets the i-th individual of the population. | |
void | setIth (int index, Individual *ind) |
Sets the i-th individual of the population. | |
void | deleteIth (int index) |
Gets the i-th individual of the population. | |
void | addIndividual (Individual *individual) |
Sets the fitness of the i-th individual. | |
void | setFitness (int index, double *fitness) |
Sets the fitness of the i-th individual. | |
void | printFitness (char *fileName) |
Prints the fitness of the individuals in the population. | |
void | printGenotype (char *fileName) |
Prints the genotype of the individuals in the population. | |
Protected Attributes | |
int | populationSize_ |
The number of individuals. | |
int | maximumPopulationSize_ |
The maximun number of individuals. | |
Individual ** | population_ |
The vector of individuals. | |
Random * | random_ |
Random number management. | |
MultiobjectiveProblem * | problem_ |
Problem to solve. |
Definition at line 23 of file Population.h.
|
Definition at line 19 of file Population.cpp. References maximumPopulationSize_, population_, populationSize_, problem_, and random_. |
|
Destructor of the class Definition at line 44 of file Population.cpp. |
|
Definition at line 111 of file Population.cpp. References maximumPopulationSize_, population_, and populationSize_. Referenced by Paes::addToArchive(), and Paes::archiveSolution(). |
|
Definition at line 129 of file Population.cpp. References population_, and populationSize_. Referenced by Paes::archiveSolution(). |
|
Definition at line 69 of file Population.cpp. References population_. Referenced by Paes::archiveSolution(), Paes::compareToArchive(), printFitness(), printGenotype(), and AdaptiveGrid::updateGridLocations(). |
|
Definition at line 60 of file Population.cpp. References maximumPopulationSize_. |
|
Definition at line 51 of file Population.cpp. References populationSize_. Referenced by Paes::archiveSolution(), Paes::compareToArchive(), printFitness(), printGenotype(), Paes::start(), and AdaptiveGrid::updateGridLocations(). |
|
Definition at line 148 of file Population.cpp. References Individual::getFitness(), getIth(), getPopulationSize(), MultiobjectiveProblem::numberOfFunctions_, and problem_. Referenced by Paes::printToFiles(). |
|
Definition at line 169 of file Population.cpp. References Individual::chromosome_, Chromosome::gene_, getIth(), getPopulationSize(), MultiobjectiveProblem::numberOfVariables_, problem_, and Gene::writeGenotype(). Referenced by Paes::printToFiles(). |
|
Definition at line 101 of file Population.cpp. References population_, and Individual::setFitness(). |
|
Definition at line 85 of file Population.cpp. References population_. |
|
Definition at line 26 of file Population.h. Referenced by addIndividual(), getMaximumPopulationSize(), and Population(). |
|
Definition at line 27 of file Population.h. Referenced by addIndividual(), deleteIth(), getIth(), Population(), setFitness(), and setIth(). |
|
Definition at line 25 of file Population.h. Referenced by addIndividual(), deleteIth(), getPopulationSize(), and Population(). |
|
Definition at line 30 of file Population.h. Referenced by Population(), printFitness(), and printGenotype(). |
|
Definition at line 28 of file Population.h. Referenced by Population(). |