EvolvingObjects
eoOneToOneBreeder< EOT > Class Template Reference

eoOneToOneBreeder: transforms a population using More...

#include <eoOneToOneBreeder.h>

Inheritance diagram for eoOneToOneBreeder< EOT >:
eoBreed< EOT > eoBF< const eoPop< EOT > &, eoPop< EOT > &, void > eoFunctorBase binary_function

List of all members.

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

Detailed Description

template<class EOT>
class eoOneToOneBreeder< EOT >

eoOneToOneBreeder: transforms a population using

  • an operator that MODIFIES only one parent from the populator (though it can use any number aside) and thus generates ONE offspring)
  • a local replacement between the parent and its offspring

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.


Constructor & Destructor Documentation

template<class EOT >
eoOneToOneBreeder< EOT >::eoOneToOneBreeder ( eoGenOp< EOT > &  _op,
eoEvalFunc< EOT > &  _eval,
double  _pReplace = 1.0,
eoHowMany  _howMany = eoHowMany(1.0) 
) [inline]

Ctor:

Parameters:
_opa general operator (must MODIFY only ONE parent)
_evalan eoEvalFunc to evaluate the offspring
_pReplaceprobability that the best of parent/offspring wins [1]
_howManyeoHowMany offpsring to generate [100%]

Definition at line 61 of file eoOneToOneBreeder.h.


Member Function Documentation

template<class EOT >
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.

Parameters:
_parentsthe initial population
_offspringthe 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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends