CellPopulation of < GEP::Individual >. Manages the selection of Individuals according to cellular process. More...
#include <CellPopulation.h>


Public Member Functions | |
| CellPopulation (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 | |
| u_short | randomNeighbor (const u_short &idx) |
| void | randomNeighbors (const u_short &idx, std::pair< u_short, u_short > &n_pair) |
| void | cellularSelection () |
Private Attributes | |
| u_short | _dx |
| u_short | _dy |
| std::vector< std::pair< short, short > > | _neighborhood |
| smallGen | _rng_neighbor |
CellPopulation of < GEP::Individual >. Manages the selection of Individuals according to cellular process.
| GEP::CellPopulation< IndividualType, Comparator >::CellPopulation | ( | const std::string & | path | ) | [inline] |
| void GEP::CellPopulation< IndividualType, Comparator >::cellularSelection | ( | ) | [inline, private] |
| void GEP::CellPopulation< 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
| user_param | - desired output | |
| elite | - if true, elite will be evaluated as well |
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::CellPopulation< IndividualType, Comparator >::fitness | ( | const bool & | elite = false |
) | [inline, virtual] |
Calcualtes fitness for all elements in population.
| elite | - if true, fitness will be calculated for elite as well |
Reimplemented from GEP::Population< IndividualType, Comparator >.
| u_short GEP::CellPopulation< IndividualType, Comparator >::randomNeighbor | ( | const u_short & | idx | ) | [inline, private] |
| void GEP::CellPopulation< IndividualType, Comparator >::randomNeighbors | ( | const u_short & | idx, | |
| std::pair< u_short, u_short > & | n_pair | |||
| ) | [inline, private] |
| void GEP::CellPopulation< IndividualType, Comparator >::readConfig | ( | const std::string & | path | ) | [inline, virtual] |
Parses config file for fields specific to the Population
Reimplemented from GEP::Population< IndividualType, Comparator >.
| void GEP::CellPopulation< IndividualType, Comparator >::runBasicGEPGeneration | ( | ) | [inline, virtual] |
Performs operators on the population in the following sequence:
> 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 >.
| void GEP::CellPopulation< 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 >.
u_short GEP::CellPopulation< IndividualType, Comparator >::_dx [private] |
x dimension of the lattice
u_short GEP::CellPopulation< IndividualType, Comparator >::_dy [private] |
y dimension of the lattice
std::vector< std::pair<short,short> > GEP::CellPopulation< IndividualType, Comparator >::_neighborhood [private] |
Neighborhood of a point; contains series of coordinates for a neighborhood on lattice of size nxm, such so coordinate c = n*x+m
smallGen GEP::CellPopulation< IndividualType, Comparator >::_rng_neighbor [private] |
1.6.1