GEP::MergePopulation< IndividualType, Comparator > Class Template Reference

MergePopulation of < GEP::Individual >. Manages the selection of Individuals according to cellular process. More...

#include <MergePopulation.h>

Inheritance diagram for GEP::MergePopulation< IndividualType, Comparator >:
Inheritance graph
[legend]
Collaboration diagram for GEP::MergePopulation< IndividualType, Comparator >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MergePopulation (const std::string &path)
void runGeneration ()
void runBasicGEPGeneration ()
void evaluate (const typename IndividualType::eval_type &user_param=typename IndividualType::eval_type(0), const bool &elite=false)
void fitness (const bool &elite=false)
void readConfig (const std::string &path)

Private Member Functions

void tournamentSelection ()
void singleIndividualOperators ()
void twoIndividualOperators ()

Private Attributes

u_short _merge_size

Detailed Description

template<class IndividualType, template< class IndividualType > class Comparator = IndividualGT>
class GEP::MergePopulation< IndividualType, Comparator >

MergePopulation of < GEP::Individual >. Manages the selection of Individuals according to cellular process.


Constructor & Destructor Documentation

template<class IndividualType , template< class IndividualType > class Comparator>
GEP::MergePopulation< IndividualType, Comparator >::MergePopulation ( const std::string &  path  )  [inline]

Member Function Documentation

template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::MergePopulation< IndividualType, Comparator >::evaluate ( const typename IndividualType::eval_type &  user_param = typename IndividualType::eval_type(0),
const bool &  elite = false 
) [inline, virtual]

Runs evaluation for all elements in population, with user_param as target case

Parameters:
user_param - desired output cast on user_param
elite - if true, a whole population will be evaluated

Reimplemented from GEP::Population< IndividualType, Comparator >.

template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::MergePopulation< IndividualType, Comparator >::fitness ( const bool &  elite = false  )  [inline, virtual]

Calcualtes fitness for all elements in population.

Parameters:
elite - if true, the fitness for a whole population will be calculated

Reimplemented from GEP::Population< IndividualType, Comparator >.

template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::MergePopulation< IndividualType, Comparator >::readConfig ( const std::string &  path  )  [inline, virtual]

Parses config file for fields specific to the Population

Reimplemented from GEP::Population< IndividualType, Comparator >.

template<class IndividualType , template< class IndividualType > class Comparator = IndividualGT>
void GEP::MergePopulation< IndividualType, Comparator >::runBasicGEPGeneration (  )  [inline, virtual]

Performs operators on the population in the following sequence:

Warning:
Assumes that population is evaluated!

> elitism (choose _eliteSize best individuals; for Ferreira _eliteSize = 1)
1) Create temporary population through:
> selection
2) Apply individual operators
> one individual operators (mutation and IS, RIS, Gene transpositions)
> two individual operators (one point, two point and gene crossovers)
> elitism, continued - replace _eliteSize first individuals with the elite ones.
3) Replace the population with temporary one
4) Replace _eliteSize first individuals with _elite

Reimplemented from GEP::Population< IndividualType, Comparator >.

template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::MergePopulation< IndividualType, Comparator >::runGeneration (  )  [inline, virtual]

Will base on the neighborhood. Assumes, that individuals are evaluated, and their fitness - calculated.

Reimplemented from GEP::Population< IndividualType, Comparator >.

template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::MergePopulation< IndividualType, Comparator >::singleIndividualOperators (  )  [inline, private, virtual]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::MergePopulation< IndividualType, Comparator >::tournamentSelection (  )  [inline, private, virtual]

Tournament Selection mechanism (instead of Roulette Wheel by Ferreira). Results are placed in temporary population. Assumes, that individuals are evaluated, and their fitness - calculated.

Reimplemented from GEP::Population< IndividualType, Comparator >.

template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::MergePopulation< IndividualType, Comparator >::twoIndividualOperators (  )  [inline, private, virtual]

Member Data Documentation

template<class IndividualType , template< class IndividualType > class Comparator = IndividualGT>
u_short GEP::MergePopulation< IndividualType, Comparator >::_merge_size [private]

Number of individuals generated each generation


The documentation for this class was generated from the following file:

Generated on Fri Dec 11 22:28:17 2009 for LibGEP by  doxygen 1.6.1