peoParaPopEval< EOT > Class Template Reference

The peoParaPopEval represents a wrapper for creating a functor capable of applying in parallel an EO-derived evaluation functor. More...

#include <peoParaPopEval.h>

Inheritance diagram for peoParaPopEval< EOT >:

peoPopEval< EOT > Service Communicable List of all members.

Public Member Functions

 peoParaPopEval (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.
 peoParaPopEval (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 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 peoParaPopEval< EOT >

The peoParaPopEval represents a wrapper for creating a functor capable of applying in parallel an EO-derived evaluation functor.

The class offers the possibility of chosing between a single-function evaluation and an aggregate evaluation function, including several sub-evalution functions.

Definition at line 54 of file peoParaPopEval.h.


Constructor & Destructor Documentation

template<class EOT>
peoParaPopEval< EOT >::peoParaPopEval ( 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 130 of file peoParaPopEval.h.

References peoParaPopEval< EOT >::one_func.

template<class EOT>
peoParaPopEval< EOT >::peoParaPopEval ( 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 139 of file peoParaPopEval.h.


Member Function Documentation

template<class EOT>
void peoParaPopEval< EOT >::operator() ( eoPop< EOT > &  __pop  )  [virtual]

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.

Implements peoPopEval< EOT >.

Definition at line 150 of file peoParaPopEval.h.

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

template<class EOT>
void peoParaPopEval< 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 171 of file peoParaPopEval.h.

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

template<class EOT>
void peoParaPopEval< 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 185 of file peoParaPopEval.h.

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

template<class EOT>
void peoParaPopEval< 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 202 of file peoParaPopEval.h.

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

template<class EOT>
void peoParaPopEval< 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 211 of file peoParaPopEval.h.

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

template<class EOT>
void peoParaPopEval< 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 242 of file peoParaPopEval.h.

template<class EOT>
void peoParaPopEval< 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 247 of file peoParaPopEval.h.

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


The documentation for this class was generated from the following file:
Generated on Mon Oct 8 11:16:48 2007 for ParadisEO-PEOMovingObjects by  doxygen 1.4.7