New style for PEO

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@789 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
canape 2007-11-16 11:34:20 +00:00
commit 9c87b3b0c0
132 changed files with 3781 additions and 3396 deletions

View file

@ -1,4 +1,4 @@
/*
/*
* <peoEvalFunc.h>
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
* (C) OPAC Team, INRIA, 2007
@ -42,19 +42,21 @@ template< class EOT, class FitT = EOT::Fitness, class FunctionArg = const EOT& >
#else
template< class EOT, class FitT = typename EOT::Fitness, class FunctionArg = const EOT& >
#endif
struct peoEvalFunc: public eoEvalFunc<EOT> {
peoEvalFunc( FitT (* _eval)( FunctionArg ) )
: eoEvalFunc<EOT>(), evalFunc( _eval ) {};
virtual void operator() ( EOT & _peo )
struct peoEvalFunc: public eoEvalFunc<EOT>
{
_peo.fitness((*evalFunc)( _peo ));
};
private:
peoEvalFunc( FitT (* _eval)( FunctionArg ) )
: eoEvalFunc<EOT>(), evalFunc( _eval )
{};
virtual void operator() ( EOT & _peo )
{
_peo.fitness((*evalFunc)( _peo ));
};
private:
FitT (* evalFunc )( FunctionArg );
};
};
#endif