Essai du nouveau "modele"
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1655 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
6a72d70f23
commit
c3085595bf
13 changed files with 85 additions and 98 deletions
|
|
@ -4,11 +4,8 @@
|
|||
#include <neighborhood/moBitNeighbor.h>
|
||||
#include <ga.h>
|
||||
|
||||
/**
|
||||
* contener of the neighbor information
|
||||
*/
|
||||
template< class Fitness >
|
||||
class moFullEvalBitNeighbor : public moBitNeighbor<Fitness>
|
||||
class moFullEvalBitNeighbor : public moFullEvalByModif<moBitNeighbor<Fitness> >
|
||||
{
|
||||
public:
|
||||
typedef eoBit<Fitness> EOType ;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#define moFullEvalByModif_H
|
||||
|
||||
#include <eoEvalFunc.h>
|
||||
#include <moEval.h>
|
||||
#include <eval/moEval.h>
|
||||
|
||||
/**
|
||||
* Full evaluation to use with a moBackableNeighbor
|
||||
|
|
@ -11,14 +11,14 @@ template<class BackableNeighbor>
|
|||
class moFullEvalByModif : public moEval<BackableNeighbor>
|
||||
{
|
||||
public:
|
||||
using moEval<BackableNeighbor>::EOT EOT;
|
||||
using moEval<BackableNeighbor>::Fitness Fitness;
|
||||
typedef typename moEval<BackableNeighbor>::EOT EOT;
|
||||
typedef typename moEval<BackableNeighbor>::Fitness Fitness;
|
||||
|
||||
/**
|
||||
* Ctor
|
||||
* @param _eval the full evaluation object
|
||||
*/
|
||||
moFullEvalByCopy(eoEvalFunc<EOT> & _eval) : eval(_eval) {}
|
||||
moFullEvalByModif(eoEvalFunc<EOT>& _eval) : eval(_eval) {}
|
||||
|
||||
/**
|
||||
* Full evaluation of the neighbor by copy
|
||||
|
|
@ -44,6 +44,7 @@ public:
|
|||
_neighbor.moveBack(_sol);
|
||||
// set the fitness back
|
||||
_sol.fitness(tmpFit);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue