|
EvolvingObjects
|
eoOneToOneBreeder: transforms a population using More...
#include <eoOneToOneBreeder.h>
Public Member Functions | |
| eoOneToOneBreeder (eoGenOp< EOT > &_op, eoEvalFunc< EOT > &_eval, double _pReplace=1.0, eoHowMany _howMany=eoHowMany(1.0)) | |
| Ctor: | |
| void | operator() (const eoPop< EOT > &_parents, eoPop< EOT > &_offspring) |
| The breeder: iteratively calls the genOp ONCE on a selective populator after having recorded the parent Then does the replacement. | |
| virtual std::string | className () const |
| The class name. | |
Private Attributes | |
| eoGenOp< EOT > & | op |
| eoEvalFunc< EOT > & | eval |
| eoSequentialSelect< EOT > | select |
| double | pReplace |
| eoHowMany | howMany |
eoOneToOneBreeder: transforms a population using
Typically, Differential Evolution (Storn and Price 94) and Deb et al's G3 can be built on this
Definition at line 52 of file eoOneToOneBreeder.h.
| eoOneToOneBreeder< EOT >::eoOneToOneBreeder | ( | eoGenOp< EOT > & | _op, |
| eoEvalFunc< EOT > & | _eval, | ||
| double | _pReplace = 1.0, |
||
| eoHowMany | _howMany = eoHowMany(1.0) |
||
| ) | [inline] |
Ctor:
| _op | a general operator (must MODIFY only ONE parent) |
| _eval | an eoEvalFunc to evaluate the offspring |
| _pReplace | probability that the best of parent/offspring wins [1] |
| _howMany | eoHowMany offpsring to generate [100%] |
Definition at line 61 of file eoOneToOneBreeder.h.
| void eoOneToOneBreeder< EOT >::operator() | ( | const eoPop< EOT > & | _parents, |
| eoPop< EOT > & | _offspring | ||
| ) | [inline, virtual] |
The breeder: iteratively calls the genOp ONCE on a selective populator after having recorded the parent Then does the replacement.
| _parents | the initial population |
| _offspring | the resulting population (content -if any- is lost) |
Implements eoBF< const eoPop< EOT > &, eoPop< EOT > &, void >.
Definition at line 77 of file eoOneToOneBreeder.h.
References eoPopulator< EOT >::tellp(), and eoRng::uniform().