GPLIB++
|
The base class for the population of a genetic algorithm, implements storage and access functions. More...
#include <GeneralPopulation.h>
Public Member Functions | |
virtual void | InitPop () |
const tpopulation & | GetOldPopulation () const |
void | StoreOldPopulation () |
void | PrintPopulation (std::ostream &output) const |
void | ReadPopulation (std::istream &input) |
void | PrintProbabilities (std::ostream &output) const |
void | PrintDistances (std::ostream &output) const |
const tpopulation & | GetPopulation () const |
const tprobabilityv & | GetProbabilities () const |
const tcrowddistv & | GetCrowdingDistances () const |
void | SetPopulation (const tpopulation &LocalPop) |
void | SetProbabilities (const tprobabilityv &LocalProb) |
void | SetCrowdingDistances (const tcrowddistv &LocalDist) |
int | GetPopsize () const |
int | GetGenesize () const |
GeneralPopulation (const int popsize, const int genesize) | |
GeneralPopulation (GeneralPopulation &Old) | |
GeneralPopulation (const tpopulation &FirstHalf, const tpopulation &SecondHalf) | |
Merge two populations in a new population object. More... | |
virtual GeneralPopulation & | operator= (const GeneralPopulation &source) |
virtual | ~GeneralPopulation () |
Protected Member Functions | |
void | ResizePop (const int popsize, const int genesize) |
Change the population size. More... | |
Protected Attributes | |
tpopulation | Population |
The population of the current iteration. More... | |
The base class for the population of a genetic algorithm, implements storage and access functions.
Definition at line 13 of file GeneralPopulation.h.
gplib::GeneralPopulation::GeneralPopulation | ( | const int | popsize, |
const int | genesize | ||
) |
Definition at line 6 of file GeneralPopulation.cpp.
gplib::GeneralPopulation::GeneralPopulation | ( | GeneralPopulation & | Old | ) |
Definition at line 17 of file GeneralPopulation.cpp.
gplib::GeneralPopulation::GeneralPopulation | ( | const tpopulation & | FirstHalf, |
const tpopulation & | SecondHalf | ||
) |
Merge two populations in a new population object.
Definition at line 24 of file GeneralPopulation.cpp.
References Population.
|
virtual |
Definition at line 13 of file GeneralPopulation.cpp.
|
inline |
Definition at line 62 of file GeneralPopulation.h.
|
inline |
Definition at line 89 of file GeneralPopulation.h.
References Population.
|
inline |
Definition at line 34 of file GeneralPopulation.h.
|
inline |
Definition at line 84 of file GeneralPopulation.h.
References Population.
Referenced by gplib::ParetoGA::CalcProbabilities(), and gplib::AnnealingGA::CalcProbabilities().
|
inline |
Definition at line 52 of file GeneralPopulation.h.
References Population.
Referenced by gplib::StandardPropagation::NextGeneration().
|
inline |
Definition at line 57 of file GeneralPopulation.h.
Referenced by gplib::AnnealingGA::GetBestIndex().
|
inlinevirtual |
Reimplemented in gplib::BinaryPopulation.
Definition at line 30 of file GeneralPopulation.h.
|
virtual |
Definition at line 41 of file GeneralPopulation.cpp.
References Population.
Referenced by gplib::BinaryPopulation::operator=().
void gplib::GeneralPopulation::PrintDistances | ( | std::ostream & | output | ) | const |
Definition at line 100 of file GeneralPopulation.cpp.
void gplib::GeneralPopulation::PrintPopulation | ( | std::ostream & | output | ) | const |
Definition at line 54 of file GeneralPopulation.cpp.
References Population.
void gplib::GeneralPopulation::PrintProbabilities | ( | std::ostream & | output | ) | const |
Definition at line 91 of file GeneralPopulation.cpp.
void gplib::GeneralPopulation::ReadPopulation | ( | std::istream & | input | ) |
Definition at line 75 of file GeneralPopulation.cpp.
References Population, and ResizePop().
|
protected |
Change the population size.
Definition at line 67 of file GeneralPopulation.cpp.
References Population.
Referenced by ReadPopulation().
|
inline |
Definition at line 79 of file GeneralPopulation.h.
|
inline |
Definition at line 67 of file GeneralPopulation.h.
References Population.
Referenced by gplib::StandardPropagation::NextGeneration().
|
inline |
Definition at line 74 of file GeneralPopulation.h.
Referenced by gplib::ParetoGA::CalcProbabilities(), and gplib::AnnealingGA::CalcProbabilities().
|
inline |
Definition at line 42 of file GeneralPopulation.h.
References Population.
Referenced by gplib::GeneralGA::DoIteration().
|
protected |
The population of the current iteration.
Definition at line 28 of file GeneralPopulation.h.
Referenced by GeneralPopulation(), GetGenesize(), GetPopsize(), GetPopulation(), gplib::BinaryPopulation::InitPop(), operator=(), PrintPopulation(), ReadPopulation(), ResizePop(), SetPopulation(), and StoreOldPopulation().