- Main Page
- Namespaces
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# peoEA< EOT > Class Template Reference

The peoEA class offers an elementary evolutionary algorithm implementation. More...

`#include <peoEA.h>`

Inheritance diagram for peoEA< EOT >:

List of all members.

## Public Member Functions
| peoEA (eoContinue< EOT > &__cont, peoPopEval< EOT > &__pop_eval, eoSelect< EOT > &__select, peoTransform< EOT > &__trans, eoReplacement< EOT > &__replace)
| Constructor for the evolutionary algorithm object - several basic parameters have to be specified, allowing for different levels of parallelism.
void | run ()
| Evolutionary algorithm function - a side effect of the fact that the class is derived from the Runner class, thus requiring the existence of a run function, the algorithm being executed on a distinct thread.
void | operator() (eoPop< EOT > &__pop)
| Function operator for specifying the population to be associated with the algorithm.
## Private Attributes
eoContinue< EOT > & | cont
peoPopEval< EOT > & | pop_eval
eoSelect< EOT > & | select
peoTransform< EOT > & | trans
eoReplacement< EOT > & | replace
eoPop< EOT > * | pop

## Detailed Description

### template<class EOT>
class peoEA< EOT >

The peoEA class offers an elementary evolutionary algorithm implementation.

In addition, as compared with the algorithms provided by the EO framework, the peoEA class has the underlying necessary structure for including, for example, parallel evaluation and parallel transformation operators, migration operators etc. Although there is no restriction on using the algorithms provided by the EO framework, the drawback resides in the fact that the EO implementation is exclusively sequential and, in consequence, no parallelism is provided. A simple example for constructing a peoEA object:

... |
eoPop< EOT > population( POP_SIZE, popInitializer ); | // creation of a population with POP_SIZE individuals - the popInitializer is a functor to be called for each individual
eoGenContinue< EOT > eaCont( NUM_GEN ); | // number of generations for the evolutionary algorithm
eoCheckPoint< EOT > eaCheckpointContinue( eaCont ); | // checkpoint incorporating the continuation criterion - startpoint for adding other checkpoint objects
peoSeqPopEval< EOT > eaPopEval( evalFunction ); | // sequential evaluation functor wrapper - evalFunction represents the actual evaluation functor
eoRankingSelect< EOT > selectionStrategy; | // selection strategy for creating the offspring population - a simple ranking selection in this case
eoSelectNumber< EOT > eaSelect( selectionStrategy, POP_SIZE ); | // the number of individuals to be selected for creating the offspring population
eoRankingSelect< EOT > selectionStrategy; | // selection strategy for creating the offspring population - a simple ranking selection in this case
eoSGATransform< EOT > transform( crossover, CROSS_RATE, mutation, MUT_RATE ); | // transformation operator - crossover and mutation operators with their associated probabilities
peoSeqTransform< EOT > eaTransform( transform ); | // ParadisEO specific sequential operator - a parallel version may be specified in the same manner
eoPlusReplacement< EOT > eaReplace; | // replacement strategy - for integrating the offspring resulting individuals in the initial population
peoEA< EOT > eaAlg( eaCheckpointContinue, eaPopEval, eaSelect, eaTransform, eaReplace ); | // ParadisEO evolutionary algorithm integrating the above defined objects
eaAlg( population ); | // specifying the initial population for the algorithm
... |

Definition at line 82 of file peoEA.h.

## Constructor & Destructor Documentation

template<class EOT>

peoEA< EOT >::peoEA | ( | eoContinue< EOT > & | __cont,
|  | peoPopEval< EOT > & | __pop_eval,
|  | eoSelect< EOT > & | __select,
|  | peoTransform< EOT > & | __trans,
|  | eoReplacement< EOT > & | __replace |
| ) |  |  |

Constructor for the evolutionary algorithm object - several basic parameters have to be specified, allowing for different levels of parallelism.

Depending on the requirements, a sequential or a parallel evaluation operator may be specified or, in the same manner, a sequential or a parallel transformation operator may be given as parameter. Out of the box objects may be provided, from the EO package, for example, or custom defined ones may be specified, provided that they are derived from the correct base classes.

Parameters:

  | eoContinue< | EOT >& __cont - continuation criterion specifying whether the algorithm should continue or not;
  | peoPopEval< | EOT >& __pop_eval - evaluation operator; it allows the specification of parallel evaluation operators, aggregate evaluation functions, etc.;
  | eoSelect< | EOT >& __select - selection strategy to be applied for constructing a list of offspring individuals;
  | peoTransform< | EOT >& __trans - transformation operator, i.e. crossover and mutation; allows for sequential or parallel transform;
  | eoReplacement< | EOT >& __replace - replacement strategy for integrating the offspring individuals in the initial population;

Definition at line 126 of file peoEA.h.

References peoEA< EOT >::pop_eval, and peoEA< EOT >::trans.

## Member Function Documentation

template<class EOT>

void peoEA< EOT >::operator() | ( | eoPop< EOT > & | __pop | ) |

Function operator for specifying the population to be associated with the algorithm.

Parameters:

  | eoPop< | EOT >& __pop - initial population of the algorithm, to be iteratively evolved;

Definition at line 142 of file peoEA.h.

References peoEA< EOT >::pop.

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

- peoEA.h