Addition of the function PSO : Parallel evaluation
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@653 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
8ca6135acb
commit
50e1f0c0b8
2 changed files with 12 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// "peoPSO.h"
|
||||
// "peoEvalFuncPSO.h"
|
||||
|
||||
// (c) OPAC Team, October 2007
|
||||
|
||||
|
|
@ -11,6 +11,11 @@
|
|||
|
||||
#include <eoEvalFunc.h>
|
||||
|
||||
/** peoEvalFuncPSO: This class
|
||||
* takes an existing function pointer and converts it into a evaluation
|
||||
* function class.
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
template< class POT, class FitT = POT::Fitness, class FunctionArg = const POT& >
|
||||
#else
|
||||
|
|
@ -21,6 +26,7 @@ struct peoEvalFuncPSO: public eoEvalFunc<POT> {
|
|||
peoEvalFuncPSO( FitT (* _eval)( FunctionArg ) )
|
||||
: eoEvalFunc<POT>(), evalFunc( _eval ) {};
|
||||
|
||||
//Applies the evaluation function to a PEO
|
||||
virtual void operator() ( POT & _peo )
|
||||
{
|
||||
_peo.fitness((*evalFunc)( _peo ));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue