diff --git a/trunk/paradiseo-mo/src/continuator/moCheckpoint.h b/trunk/paradiseo-mo/src/continuator/moCheckpoint.h index 6ed74e0db..37b5cd610 100644 --- a/trunk/paradiseo-mo/src/continuator/moCheckpoint.h +++ b/trunk/paradiseo-mo/src/continuator/moCheckpoint.h @@ -96,7 +96,7 @@ public : * add a MO updater to the checkpoint * @param _moupd an mo updater */ - void add(eoUpdater& _moupd) { + void add(moUpdater& _moupd) { moupdaters.push_back(&_moupd); } diff --git a/trunk/paradiseo-mo/src/eval/moDoubleIncrEvaluation.h b/trunk/paradiseo-mo/src/eval/moDoubleIncrEvaluation.h index ed647d93e..1f4ce3b24 100644 --- a/trunk/paradiseo-mo/src/eval/moDoubleIncrEvaluation.h +++ b/trunk/paradiseo-mo/src/eval/moDoubleIncrEvaluation.h @@ -47,12 +47,15 @@ template class moDoubleIncrEvaluation : public moNeighborhoodEvaluation, moUpdater { public: + typedef typename Neighbor::EOT EOT; + typedef typename EOT::Fitness Fitness; + /** * Constructor * * @param _neighborhoodSize the size of the neighborhood */ - moDoubleIncrEvaluation(unsigned int _neighborhoodSize) : moNeighborhoodEvaluation, moUpdater(), neighborhoodSize(_neighborhoodSize), firstEval(true) { + moDoubleIncrEvaluation(unsigned int _neighborhoodSize) : moNeighborhoodEvaluation(), moUpdater(), neighborhoodSize(_neighborhoodSize), firstEval(true) { deltaFitness = new Fitness[neighborhoodSize]; } @@ -79,7 +82,7 @@ public: * * @param _solution the current solution */ - virtual operator()(EOT & _solution) { + virtual void operator()(EOT & _solution) { } /** the delta of fitness for each neighbors diff --git a/trunk/paradiseo-mo/src/eval/moDoubleIncrNeighborhoodEval.h b/trunk/paradiseo-mo/src/eval/moDoubleIncrNeighborhoodEval.h index 96c3d6497..61ef09176 100644 --- a/trunk/paradiseo-mo/src/eval/moDoubleIncrNeighborhoodEval.h +++ b/trunk/paradiseo-mo/src/eval/moDoubleIncrNeighborhoodEval.h @@ -36,7 +36,7 @@ #define moDoubleIncrNeighborhoodEval_H #include -#include +#include /** * Evaluation of a neighbor from the full evaluation f the neighborhood diff --git a/trunk/paradiseo-mo/src/eval/moUBQPdoubleIncrEvaluation.h b/trunk/paradiseo-mo/src/eval/moUBQPdoubleIncrEvaluation.h index edad0f037..6c8016058 100644 --- a/trunk/paradiseo-mo/src/eval/moUBQPdoubleIncrEvaluation.h +++ b/trunk/paradiseo-mo/src/eval/moUBQPdoubleIncrEvaluation.h @@ -35,8 +35,8 @@ #ifndef moUBQPdoubleIncrEvaluation_H #define moUBQPdoubleIncrEvaluation_H -#include -#include +#include +#include #include /** @@ -46,10 +46,14 @@ * BECAREFULL: This object must be added to the moCheckpoint of the local search (init method) */ template -class moUBQPdoubleIncrEvaluation : public moNeighborhoodEvaluation +class moUBQPdoubleIncrEvaluation : public moDoubleIncrEvaluation { public: - using moDoubleIncrEvaluation::deltaFitness; + typedef typename Neighbor::EOT EOT; + typedef typename EOT::Fitness Fitness; + + using moDoubleIncrEvaluation::deltaFitness; + using moDoubleIncrEvaluation::firstEval; /** * Constructor @@ -58,7 +62,7 @@ public: * @param _searchExplorer the neighborhood explorer of the local search * @param _incrEval the incremental evaluation of the UBQP */ - moUBQPdoubleIncrEvaluation(unsigned int _neighborhoodSize, moNeighborhoodExplorer & _searchExplorer, moEval & _incrEval) : moDoubleIncrNeighborhoodEvaluation(_neighborhoodSize), searchExplorer(_searchExplorer) + moUBQPdoubleIncrEvaluation(unsigned int _neighborhoodSize, moNeighborhoodExplorer & _searchExplorer, moEval & _incrEval) : moDoubleIncrEvaluation(_neighborhoodSize), searchExplorer(_searchExplorer) { n = _incrEval.getNbVar(); Q = _incrEval.getQ(); @@ -71,7 +75,7 @@ public: * * @param _solution the current solution */ - virtual operator()(EOT & _solution) { + virtual void operator()(EOT & _solution) { if (firstEval) { firstEval = false;