peoPopEval< EOT > Class Template Reference

Parallel evaluation functor wrapper. More...

#include <peoPopEval.h>

Inheritance diagram for peoPopEval< EOT >:

Service eoPopEvalFunc< EOT > Communicable eoBF< A1, A2, R > eoFunctorBase List of all members.

Public Member Functions

 peoPopEval (eoEvalFunc< EOT > &__eval_func)
 Constructor function - an EO-derived evaluation functor has to be specified; an internal reference is set towards the specified evaluation functor.
 peoPopEval (const std::vector< eoEvalFunc< EOT > * > &__funcs, peoAggEvalFunc< EOT > &__merge_eval)
 Constructor function - a vector of EO-derived evaluation functors has to be specified as well as an aggregation function.
void operator() (eoPop< EOT > &__pop)
 Operator for applying the evaluation functor (direct or aggregate) for each individual of the specified population.
void operator() (eoPop< EOT > &__dummy, eoPop< EOT > &__pop)
 Operator ()( eoPop< EOT >& __dummy, eoPop< EOT >& __pop ).
void packData ()
 Auxiliary function for transferring data between the process requesting an evaluation operation and the process that performs the actual evaluation phase.
void unpackData ()
 Auxiliary function for transferring data between the process requesting an evaluation operation and the process that performs the actual evaluation phase.
void execute ()
 Auxiliary function - it calls the specified evaluation functor(s). There is no need to explicitly call the function.
void packResult ()
 Auxiliary function for transferring data between the process requesting an evaluation operation and the process that performs the actual evaluation phase.
void unpackResult ()
 Auxiliary function for transferring data between the process requesting an evaluation operation and the process that performs the actual evaluation phase.
void notifySendingData ()
 Auxiliary function for notifications between the process requesting an evaluation operation and the processes that performs the actual evaluation phase.
void notifySendingAllResourceRequests ()
 Auxiliary function for notifications between the process requesting an evaluation operation and the processes that performs the actual evaluation phase.

Private Attributes

const std::vector< eoEvalFunc<
EOT > * > & 
funcs
std::vector< eoEvalFunc< EOT > * > one_func
peoAggEvalFunc< EOT > & merge_eval
peoNoAggEvalFunc< EOT > no_merge_eval
std::queue< EOT * > tasks
std::map< EOT *, std::pair<
unsigned, unsigned > > 
progression
unsigned num_func
EOT sol
EOT * ad_sol
unsigned total

Detailed Description

template<class EOT>
class peoPopEval< EOT >

Parallel evaluation functor wrapper.

See also:
Service eoPopEvalFunc
Version:
1.2
Date:
2006

Definition at line 53 of file peoPopEval.h.


Constructor & Destructor Documentation

template<class EOT>
peoPopEval< EOT >::peoPopEval ( eoEvalFunc< EOT > &  __eval_func  ) 

Constructor function - an EO-derived evaluation functor has to be specified; an internal reference is set towards the specified evaluation functor.

Parameters:
eoEvalFunc< EOT >& __eval_func - EO-derived evaluation functor to be applied in parallel on each individual of a specified population

Definition at line 132 of file peoPopEval.h.

References peoPopEval< EOT >::one_func.

template<class EOT>
peoPopEval< EOT >::peoPopEval ( const std::vector< eoEvalFunc< EOT > * > &  __funcs,
peoAggEvalFunc< EOT > &  __merge_eval 
)

Constructor function - a vector of EO-derived evaluation functors has to be specified as well as an aggregation function.

Parameters:
const std :: vector< eoEvalFunc < EOT >* >& __funcs - vector of EO-derived partial evaluation functors;
peoAggEvalFunc< EOT >& __merge_eval - aggregation functor for creating a fitness value out of the partial fitness values.

Definition at line 141 of file peoPopEval.h.


Member Function Documentation

template<class EOT>
void peoPopEval< EOT >::operator() ( eoPop< EOT > &  __pop  ) 

Operator for applying the evaluation functor (direct or aggregate) for each individual of the specified population.

Parameters:
eoPop< EOT >& __pop - population to be evaluated by applying the evaluation functor specified in the constructor.

Definition at line 154 of file peoPopEval.h.

References peoPopEval< EOT >::funcs, peoPopEval< EOT >::progression, Service::requestResourceRequest(), Communicable::stop(), peoPopEval< EOT >::tasks, and peoPopEval< EOT >::total.

Referenced by peoPopEval< EOT >::operator()().

template<class EOT>
void peoPopEval< EOT >::operator() ( eoPop< EOT > &  __dummy,
eoPop< EOT > &  __pop 
)

Operator ()( eoPop< EOT >& __dummy, eoPop< EOT >& __pop ).

Parameters:
eoPop< EOT >& __dummy
eoPop< EOT >& __pop

Definition at line 149 of file peoPopEval.h.

References peoPopEval< EOT >::operator()().

template<class EOT>
void peoPopEval< EOT >::packData (  )  [virtual]

Auxiliary function for transferring data between the process requesting an evaluation operation and the process that performs the actual evaluation phase.

There is no need to explicitly call the function.

Reimplemented from Service.

Definition at line 176 of file peoPopEval.h.

References peoPopEval< EOT >::progression, and peoPopEval< EOT >::tasks.

template<class EOT>
void peoPopEval< EOT >::unpackData (  )  [virtual]

Auxiliary function for transferring data between the process requesting an evaluation operation and the process that performs the actual evaluation phase.

There is no need to explicitly call the function.

Reimplemented from Service.

Definition at line 190 of file peoPopEval.h.

References peoPopEval< EOT >::ad_sol, peoPopEval< EOT >::num_func, and peoPopEval< EOT >::sol.

template<class EOT>
void peoPopEval< EOT >::packResult (  )  [virtual]

Auxiliary function for transferring data between the process requesting an evaluation operation and the process that performs the actual evaluation phase.

There is no need to explicitly call the function.

Reimplemented from Service.

Definition at line 208 of file peoPopEval.h.

References peoPopEval< EOT >::ad_sol, and peoPopEval< EOT >::sol.

template<class EOT>
void peoPopEval< EOT >::unpackResult (  )  [virtual]

Auxiliary function for transferring data between the process requesting an evaluation operation and the process that performs the actual evaluation phase.

There is no need to explicitly call the function.

Reimplemented from Service.

Definition at line 217 of file peoPopEval.h.

References peoPopEval< EOT >::ad_sol, Service::getOwner(), peoPopEval< EOT >::merge_eval, peoPopEval< EOT >::progression, Communicable::resume(), Thread::setActive(), and peoPopEval< EOT >::total.

template<class EOT>
void peoPopEval< EOT >::notifySendingData (  )  [virtual]

Auxiliary function for notifications between the process requesting an evaluation operation and the processes that performs the actual evaluation phase.

There is no need to explicitly call the function.

Reimplemented from Service.

Definition at line 250 of file peoPopEval.h.

template<class EOT>
void peoPopEval< EOT >::notifySendingAllResourceRequests (  )  [virtual]

Auxiliary function for notifications between the process requesting an evaluation operation and the processes that performs the actual evaluation phase.

There is no need to explicitly call the function.

Reimplemented from Service.

Definition at line 254 of file peoPopEval.h.

References Service::getOwner(), and Thread::setPassive().


Member Data Documentation

template<class EOT>
const std :: vector< eoEvalFunc < EOT >* >& peoPopEval< EOT >::funcs [private]

Parameters:
std :: vector< eoEvalFunc < EOT >* >& funcs
std :: vector< eoEvalFunc < EOT >* > one_func
peoAggEvalFunc< EOT >& merge_eval
peoNoAggEvalFunc< EOT > no_merge_eval
std :: queue< EOT* >tasks
std :: map< EOT*, std :: pair< unsigned, unsigned > > progression
unsigned num_func
EOT sol
EOT *ad_sol
unsigned total

Definition at line 119 of file peoPopEval.h.

Referenced by peoPopEval< EOT >::execute(), and peoPopEval< EOT >::operator()().


The documentation for this class was generated from the following file:
Generated on Thu Mar 13 15:55:06 2008 for ParadisEO-PEO-ParallelanddistributedEvolvingObjects by  doxygen 1.4.7