#ifndef moIncrEvalWrapper_H #define moIncrEvalWrapper_H #include #include /* * (Old fashioned) Incremental evaluation to use with a moMoveNeighbor * WARNING: Don't use this class unless you are an moMove user. */ template class moIncrEvalWrapper : public moEval { public: using moEval::EOT EOT; using moEval::Fitness Fitness; moIncrEvalWrapper(moIncrEval& _incr):incr(_incr) {} /* * make the evaluation of the current neighbor and update the information on this neighbor * the evaluation could be incremental */ virtual void eval(MoveNeighbor& _neighbor,EOT & _solution) { _neighbor.fitness(incrEval(*(_neighbor.getMove()), _solution)); } private: /** the full evaluation object */ moIncrEval & incrEval; }; #endif