20 typedef ublas::matrix_row<gplib::rmat>::const_iterator tMisfitIterator;
21 void CalcCrowdingDistance(gplib::rmat &LocalMisFit,
23 std::vector<std::vector<int> > Ranks;
27 void virtual Elitism(
const int iterationnumber);
32 return Ranks.front().size();
51 GeneralGA(LocalPropagation, LocalPopulation, LocalTranscribe,
52 IndObjective, nthreads)
The base class for the population of a genetic algorithm, implements storage and access functions...
virtual void Elitism(const int iterationnumber)
The function Elitism ensures that the best models are preserved after mutation and crossover...
The base class for genetic algorithm propagation methods.
ParetoGA(GeneralPropagation *const LocalPropagation, GeneralPopulation *const LocalPopulation, GeneralTranscribe *const LocalTranscribe, const tObjectiveVector &IndObjective, const int nthreads=1)
The constructor needs other classes that determine the behaviour of the GA.
unsigned virtual int GetNBestmodels()
Return the size of the pareto-optimal front.
void PrintRanks(std::ostream &output)
Write the population by ranks to the stream output.
virtual void CalcProbabilities(const int iterationnumber, gplib::rmat &LocalMisFit, GeneralPopulation &LocalPopulation)
Calculate the probabilities of reproduction by ranking the population.
General Transcribe base class for genetic algorithm parameter transcription.
void PrintFront(std::ostream &output)
Write the models in the pareto-optimal front to stream output.
General genetic algorithm class.
Implements a genetic algorithm based on the concept of pareto-optimality, best suited for multi-objec...
std::vector< boost::shared_ptr< GeneralObjective > > tObjectiveVector
virtual std::vector< int > GetBestModelIndices()
Get the indices of the models within the Pareto front.