Debug some new class
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2554 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
822c68a513
commit
05a41c7592
4 changed files with 17 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,12 +47,15 @@ template<class Neighbor>
|
|||
class moDoubleIncrEvaluation : public moNeighborhoodEvaluation<Neighbor>, 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<Neighbor>, moUpdater(), neighborhoodSize(_neighborhoodSize), firstEval(true) {
|
||||
moDoubleIncrEvaluation(unsigned int _neighborhoodSize) : moNeighborhoodEvaluation<Neighbor>(), 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
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#define moDoubleIncrNeighborhoodEval_H
|
||||
|
||||
#include <eval/moEval.h>
|
||||
#include <evla/moDoubleIncrEvaluation.h>
|
||||
#include <eval/moDoubleIncrEvaluation.h>
|
||||
|
||||
/**
|
||||
* Evaluation of a neighbor from the full evaluation f the neighborhood
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
#ifndef moUBQPdoubleIncrEvaluation_H
|
||||
#define moUBQPdoubleIncrEvaluation_H
|
||||
|
||||
#include <eval/moDoubleIncrNeighborhoodEvaluation.h>
|
||||
#include <neighborhood/moNeighborhoodExplorer.h>
|
||||
#include <eval/moDoubleIncrEvaluation.h>
|
||||
#include <explorer/moNeighborhoodExplorer.h>
|
||||
#include <eval/moEval.h>
|
||||
|
||||
/**
|
||||
|
|
@ -46,10 +46,14 @@
|
|||
* BECAREFULL: This object must be added to the moCheckpoint of the local search (init method)
|
||||
*/
|
||||
template<class Neighbor>
|
||||
class moUBQPdoubleIncrEvaluation : public moNeighborhoodEvaluation<Neighbor>
|
||||
class moUBQPdoubleIncrEvaluation : public moDoubleIncrEvaluation<Neighbor>
|
||||
{
|
||||
public:
|
||||
using moDoubleIncrEvaluation::deltaFitness;
|
||||
typedef typename Neighbor::EOT EOT;
|
||||
typedef typename EOT::Fitness Fitness;
|
||||
|
||||
using moDoubleIncrEvaluation<Neighbor>::deltaFitness;
|
||||
using moDoubleIncrEvaluation<Neighbor>::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<Neighbor> & _searchExplorer, moEval<Neighbor> & _incrEval) : moDoubleIncrNeighborhoodEvaluation<Neighbor>(_neighborhoodSize), searchExplorer(_searchExplorer)
|
||||
moUBQPdoubleIncrEvaluation(unsigned int _neighborhoodSize, moNeighborhoodExplorer<Neighbor> & _searchExplorer, moEval<Neighbor> & _incrEval) : moDoubleIncrEvaluation<Neighbor>(_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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue