fix(mo): comment out unused parameters
Removes -Wunused-parameters warnings.
This commit is contained in:
parent
1a980c442d
commit
843aa6fc37
69 changed files with 159 additions and 159 deletions
|
|
@ -48,7 +48,7 @@ public:
|
|||
* @param _sol2 the new solution after local search
|
||||
* @return always true
|
||||
*/
|
||||
bool operator()(EOT& _sol1, EOT& _sol2) {
|
||||
bool operator()(EOT& /*_sol1*/, EOT& /*_sol2*/) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public:
|
|||
* Do nothing on the solution
|
||||
* @param _solution the related solution
|
||||
*/
|
||||
virtual bool operator()(EOT & _solution) {
|
||||
virtual bool operator()(EOT & /*_solution*/) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public :
|
|||
* Set the average of fitness in the neighborhood
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getMean();
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ public :
|
|||
* Set the average of fitness in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getMean();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
* reset the counter of iteration
|
||||
* @param _solution a solution
|
||||
*/
|
||||
virtual void init(EOT & _solution) {
|
||||
virtual void init(EOT & /*_solution*/) {
|
||||
cpt = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public :
|
|||
* Init the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = *b;
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ public :
|
|||
* Set the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = *b;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,13 +52,13 @@ public:
|
|||
* Init Continuator parameters
|
||||
* @param _solution the related solution
|
||||
*/
|
||||
virtual void init(EOT& _solution) {};
|
||||
virtual void init(EOT& /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Last Call to terminate the checkpoint
|
||||
* @param _solution the related solution
|
||||
*/
|
||||
virtual void lastCall(EOT& _solution) {};
|
||||
virtual void lastCall(EOT& /*_solution*/) {};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public :
|
|||
* Init the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = 0;
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ public :
|
|||
* Set the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = value() + 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public:
|
|||
* @param _solution a solution
|
||||
* @return true if number of evaluations < maxEvals
|
||||
*/
|
||||
virtual bool operator()(EOT & _solution) {
|
||||
virtual bool operator()(EOT & /*_solution*/) {
|
||||
return (fullEval.value() + neighborEval.value() - nbEval_start < maxEvals);
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ public:
|
|||
* Reset the number of evaluations
|
||||
* @param _solution a solution
|
||||
*/
|
||||
virtual void init(EOT & _solution) {
|
||||
virtual void init(EOT & /*_solution*/) {
|
||||
if (restartCounter)
|
||||
nbEval_start = fullEval.value() + neighborEval.value();
|
||||
else
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
* @param _solution a solution
|
||||
* @return true if number of evaluations < maxFullEval
|
||||
*/
|
||||
virtual bool operator()(EOT & _solution) {
|
||||
virtual bool operator()(EOT & /*_solution*/) {
|
||||
return (eval.value() - nbEval_start < maxFullEval);
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public:
|
|||
* Reset the number of evaluations
|
||||
* @param _solution a solution
|
||||
*/
|
||||
virtual void init(EOT & _solution) {
|
||||
virtual void init(EOT & /*_solution*/) {
|
||||
if (restartCounter)
|
||||
nbEval_start = eval.value();
|
||||
else
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
*@param _solution a solution
|
||||
*@return true if counter < maxIter
|
||||
*/
|
||||
virtual bool operator()(EOT & _solution) {
|
||||
virtual bool operator()(EOT & /*_solution*/) {
|
||||
bool res;
|
||||
cpt++;
|
||||
res = (cpt < maxIter);
|
||||
|
|
@ -65,7 +65,7 @@ public:
|
|||
* reset the counter of iteration
|
||||
* @param _solution a solution
|
||||
*/
|
||||
virtual void init(EOT & _solution) {
|
||||
virtual void init(EOT & /*_solution*/) {
|
||||
cpt = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public :
|
|||
* Set the max fitness in the neighborhood
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getMax();
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ public :
|
|||
* Set the max fitness in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getMax();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public :
|
|||
* Set the median fitness in the neighborhood
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getMedian();
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public :
|
|||
* Set the median fitness in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getMedian();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public :
|
|||
* Set the worst fitness in the neighborhood
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getMin();
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ public :
|
|||
* Set the worst fitness in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getMin();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public :
|
|||
* Init the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
counter = 0;
|
||||
value() = 0;
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ public :
|
|||
* Set the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
counter++;
|
||||
if (counter > 0)
|
||||
value() = counter - 1;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public :
|
|||
* Set the number of solutions in the neighborhood with (strictly) lower fitness than the current solution
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getNbInf();
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public :
|
|||
* Set the number of solutions in the neighborhood with (strictly) lower fitness than the current solution
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getNbInf();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public :
|
|||
* Set the number of solutions in the neighborhood with better fitness than the current solution
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getNbSup();
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public :
|
|||
* Set the number of solutions in the neighborhood with better fitness than the current solution
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getNbSup();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public:
|
|||
* @param _solution a solution
|
||||
* @return true if number of evaluations < maxNeighborEval
|
||||
*/
|
||||
virtual bool operator()(EOT & _solution) {
|
||||
virtual bool operator()(EOT & /*_solution*/) {
|
||||
return (eval.value() - nbEval_start < maxNeighborEval);
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ public:
|
|||
* Reset the number of evaluations
|
||||
* @param _solution a solution
|
||||
*/
|
||||
virtual void init(EOT & _solution) {
|
||||
virtual void init(EOT & /*_solution*/) {
|
||||
if (restartCounter)
|
||||
nbEval_start = eval.value();
|
||||
else
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public :
|
|||
* Set the neutral degree of the solution which is the number of solutions in the neighborhood with equals fitness
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getNbEqual();
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public :
|
|||
* Set the neutral degree of the solution which is the number of solutions in the neighborhood with equals fitness
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getNbEqual();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public :
|
|||
* Set the first quartile of fitness in the neighborhood
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getQ1();
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public :
|
|||
* Set the first quartile of fitness in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getQ1();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public :
|
|||
* Set the third quartile of fitness in the neighborhood
|
||||
* @param _sol the third solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getQ3();
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public :
|
|||
* Set the third quartile of fitness in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getQ3();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public :
|
|||
* Set the average and the standard deviation of fitness in the neighborhood
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value().first = nhStat.getMean();
|
||||
value().second = nhStat.getSD();
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ public :
|
|||
* Set the average and the standard deviation of fitness in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value().first = nhStat.getMean();
|
||||
value().second = nhStat.getSD();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public :
|
|||
* Set the number of solutions in the neighborhood
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getSize();
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ public :
|
|||
* Set the number of solutions in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getSize();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public :
|
|||
* Constructor
|
||||
* @param _description a description of the parameter
|
||||
*/
|
||||
moSolutionStat(std::string _description = "solution"):
|
||||
moSolutionStat(std::string /*_description */= "solution"):
|
||||
moStat<EOT, EOT>(EOT(), "fitness solution") { }
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public :
|
|||
* The value of this stat is a copy of the value of the initial stat
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = stat.value();
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ public :
|
|||
* The value of this stat is a copy of the value of the initial stat
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = stat.value();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public :
|
|||
* Set the average and the standard deviation of fitness in the neighborhood
|
||||
* @param _sol the first solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = nhStat.getSD();
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ public :
|
|||
* Set the average and the standard deviation of fitness in the neighborhood
|
||||
* @param _sol the corresponding solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = nhStat.getSD();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public:
|
|||
* Returns false when the running time is reached.
|
||||
* @param _sol the current solution
|
||||
*/
|
||||
virtual bool operator() (EOT& _sol)
|
||||
virtual bool operator() (EOT& /*_sol*/)
|
||||
{
|
||||
bool res;
|
||||
time_t elapsed = (time_t) difftime(time(NULL), start);
|
||||
|
|
@ -102,7 +102,7 @@ public:
|
|||
* reset the start time
|
||||
* @param _solution a solution
|
||||
*/
|
||||
virtual void init(EOT & _solution) {
|
||||
virtual void init(EOT & /*_solution*/) {
|
||||
if (!external)
|
||||
start = time(NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
* @param _solution a solution
|
||||
* @return always true
|
||||
*/
|
||||
virtual bool operator()(EOT & _solution) {
|
||||
virtual bool operator()(EOT & /*_solution*/) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ public:
|
|||
* NOTHING TO DO
|
||||
* @param _solution a solution
|
||||
*/
|
||||
virtual void init(EOT & _solution) {}
|
||||
virtual void init(EOT & /*_solution*/) {}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public :
|
|||
* Init the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
value() = *b;
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ public :
|
|||
* Set the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = *b;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public :
|
|||
* Init the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
if (restart)
|
||||
value_start = valueParam.value();
|
||||
else
|
||||
|
|
@ -73,7 +73,7 @@ public :
|
|||
* Set the number of iteration
|
||||
* @param _sol a solution
|
||||
*/
|
||||
virtual void operator()(EOT & _sol) {
|
||||
virtual void operator()(EOT & /*_sol*/) {
|
||||
value() = (double) (valueParam.value() - value_start);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public:
|
|||
* @param _param unvalid Parameter
|
||||
*/
|
||||
template <class T>
|
||||
moVectorMonitor(eoValueParam<T> & _param) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), intLongLongParam(NULL), eotParam(NULL)
|
||||
moVectorMonitor(eoValueParam<T> & /*_param*/) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), intLongLongParam(NULL), eotParam(NULL)
|
||||
{
|
||||
std::cerr << "Sorry the type can not be in a vector of moVectorMonitor" << std::endl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
* Initial temperature
|
||||
* @param _solution initial solution
|
||||
*/
|
||||
virtual double init(EOT & _solution) {
|
||||
virtual double init(EOT & /*_solution*/) {
|
||||
// number of tries since the last temperature change
|
||||
spanTries = 0;
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ public:
|
|||
* @param _temp current temperature
|
||||
* @return true if the search can continue
|
||||
*/
|
||||
virtual bool operator()(double _temp) {
|
||||
virtual bool operator()(double /*_temp*/) {
|
||||
return nbSpan <= nbSpanMax;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public:
|
|||
* @param _solution initial solution
|
||||
* @return the initial temperature
|
||||
*/
|
||||
virtual double init(EOT & _solution) {
|
||||
virtual double init(EOT & /*_solution*/) {
|
||||
// number of iteration with the same temperature
|
||||
step = 0;
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public:
|
|||
* @param _temp current temperature to update
|
||||
* @param _acceptedMove true when the move is accepted, false otherwise
|
||||
*/
|
||||
virtual void update(double& _temp, bool _acceptedMove) {
|
||||
virtual void update(double& _temp, bool /*_acceptedMove*/) {
|
||||
if (step >= span) {
|
||||
_temp *= alpha;
|
||||
step = 0;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public:
|
|||
*
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void operator()(EOT & _solution) {
|
||||
virtual void operator()(EOT & /*_solution*/) {
|
||||
}
|
||||
|
||||
/** the delta of fitness for each neighbors
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
* @param _sol unused solution
|
||||
* @param _n unused neighbor
|
||||
*/
|
||||
void operator()(EOT& _sol, Neighbor& _n) {}
|
||||
void operator()(EOT& /*_sol*/, Neighbor& /*_n*/) {}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -54,20 +54,20 @@ public:
|
|||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
void initParam (EOT& _solution) { } ;
|
||||
void initParam (EOT& /*_solution*/) { } ;
|
||||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
void updateParam (EOT& _solution) { } ;
|
||||
void updateParam (EOT& /*_solution*/) { } ;
|
||||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
* @return always false
|
||||
*/
|
||||
bool isContinue(EOT& _solution) {
|
||||
bool isContinue(EOT& /*_solution*/) {
|
||||
return false;
|
||||
} ;
|
||||
|
||||
|
|
@ -75,14 +75,14 @@ public:
|
|||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
void move(EOT& _solution) { } ;
|
||||
void move(EOT& /*_solution*/) { } ;
|
||||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
* @return always false
|
||||
*/
|
||||
virtual bool accept(EOT& _solution) {
|
||||
virtual bool accept(EOT& /*_solution*/) {
|
||||
return false;
|
||||
} ;
|
||||
|
||||
|
|
@ -90,13 +90,13 @@ public:
|
|||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT& _solution) { } ;
|
||||
virtual void terminate(EOT& /*_solution*/) { } ;
|
||||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
void operator()(EOT & _solution) { }
|
||||
void operator()(EOT & /*_solution*/) { }
|
||||
|
||||
/**
|
||||
* Return the class name
|
||||
|
|
|
|||
|
|
@ -85,19 +85,19 @@ public:
|
|||
* initParam: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void initParam(EOT & _solution) {};
|
||||
virtual void initParam(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* updateParam: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void updateParam(EOT & _solution) {};
|
||||
virtual void updateParam(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution until an ameliorated neighbor is found
|
||||
|
|
@ -135,7 +135,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true if an ameliorated neighbor was found
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
if (stop)
|
||||
return isAccept ;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public:
|
|||
* terminate: NOTHING TO DO
|
||||
* @param _solution a solution (unused)
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Perturb and apply local search on a solution
|
||||
|
|
@ -135,7 +135,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return always true
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public:
|
|||
* initialization of the number of step to be done
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void initParam(EOT & _solution) {
|
||||
virtual void initParam(EOT & /*_solution*/) {
|
||||
step = 0;
|
||||
isAccept = true;
|
||||
};
|
||||
|
|
@ -94,7 +94,7 @@ public:
|
|||
* increase the number of step
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
virtual void updateParam(EOT & /*_solution*/) {
|
||||
step++;
|
||||
};
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ public:
|
|||
* terminate: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
|
|
@ -128,7 +128,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true there is some steps to do
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return (step < nbStep) ;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true there is some steps to do
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return (step < nbStep) && isAccept ;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public:
|
|||
* empty the vector of best solutions
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void initParam(EOT & _solution) {
|
||||
virtual void initParam(EOT & /*_solution*/) {
|
||||
// delete all the best solutions
|
||||
bestVector.clear();
|
||||
};
|
||||
|
|
@ -94,7 +94,7 @@ public:
|
|||
* empty the vector of best solutions
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
virtual void updateParam(EOT & /*_solution*/) {
|
||||
// delete all the best solutions
|
||||
bestVector.clear();
|
||||
};
|
||||
|
|
@ -103,7 +103,7 @@ public:
|
|||
* terminate: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
|
|
@ -156,7 +156,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true if an ameliorated neighbor was be found
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return isAccept ;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public:
|
|||
* initialization of the number of step to be done
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void initParam(EOT & _solution) {
|
||||
virtual void initParam(EOT & /*_solution*/) {
|
||||
step = 0;
|
||||
isAccept = true;
|
||||
};
|
||||
|
|
@ -96,7 +96,7 @@ public:
|
|||
* increase the number of step
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
virtual void updateParam(EOT & /*_solution*/) {
|
||||
step++;
|
||||
};
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ public:
|
|||
* terminate: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
|
|
@ -142,7 +142,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true there is some steps to do
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return (step < nbStep) && isAccept ;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
* initialization of the number of step to be done
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void initParam(EOT & _solution) {
|
||||
virtual void initParam(EOT & /*_solution*/) {
|
||||
step = 0;
|
||||
};
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ public:
|
|||
* increase the number of step
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
virtual void updateParam(EOT & /*_solution*/) {
|
||||
step++;
|
||||
};
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ public:
|
|||
* terminate: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood with only one random solution
|
||||
|
|
@ -111,7 +111,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true there is some steps to do
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return (step < nbStep) ;
|
||||
};
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ public:
|
|||
* move the solution with the best neighbor
|
||||
* @param _solution the solution to move
|
||||
*/
|
||||
virtual void move(EOT & _solution) {
|
||||
virtual void move(EOT & /*_solution*/) {
|
||||
// the solution is already move. So nothing to do !
|
||||
};
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true if the best neighbor ameliorate the fitness
|
||||
*/
|
||||
virtual bool accept(EOT & _solution) {
|
||||
virtual bool accept(EOT & /*_solution*/) {
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public:
|
|||
* initialization of the number of step to be done
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void initParam(EOT & _solution) {
|
||||
virtual void initParam(EOT & /*_solution*/) {
|
||||
isAccept = true;
|
||||
};
|
||||
|
||||
|
|
@ -90,14 +90,14 @@ public:
|
|||
* increase the number of step
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
virtual void updateParam(EOT & /*_solution*/) {
|
||||
};
|
||||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood with only one random solution
|
||||
|
|
@ -127,7 +127,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true there is some steps to do
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return isAccept ;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public:
|
|||
* decrease the temperature if necessary
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void updateParam(EOT & _solution) {
|
||||
virtual void updateParam(EOT & /*_solution*/) {
|
||||
coolingSchedule.update(temperature, this->moveApplied());
|
||||
};
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ public:
|
|||
* terminate: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Explore one random solution in the neighborhood
|
||||
|
|
@ -129,7 +129,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true if the criteria from the cooling schedule is true
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return coolingSchedule(temperature);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -76,19 +76,19 @@ public:
|
|||
* initParam: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void initParam(EOT & _solution) {};
|
||||
virtual void initParam(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* updateParam: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void updateParam(EOT & _solution) {};
|
||||
virtual void updateParam(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* terminate: NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
*/
|
||||
virtual void terminate(EOT & _solution) {};
|
||||
virtual void terminate(EOT & /*_solution*/) {};
|
||||
|
||||
/**
|
||||
* Explore the neighborhood of a solution
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true if an ameliorated neighbor was be found
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return isAccept ;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
@ -204,7 +204,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true if the best neighbor ameliorate the fitness
|
||||
*/
|
||||
virtual bool accept(EOT & _solution) {
|
||||
virtual bool accept(EOT & /*_solution*/) {
|
||||
return isAccept;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public:
|
|||
* @param _solution the solution
|
||||
* @return true if an ameliorated neighbor was be found
|
||||
*/
|
||||
virtual bool isContinue(EOT & _solution) {
|
||||
virtual bool isContinue(EOT & /*_solution*/) {
|
||||
return !stop;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
* @param _sol a solution
|
||||
* @param _neighbor a neighbor
|
||||
*/
|
||||
void update(EOT & _sol, Neighbor & _neighbor) {
|
||||
void update(EOT & _sol, Neighbor & /*_neighbor*/) {
|
||||
if (bestFoundSoFar.fitness() < _sol.fitness())
|
||||
bestFoundSoFar = _sol;
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ public:
|
|||
* @param _neighbor a neighbor
|
||||
* @return true if _neighbor fitness is better than the "bestFoundSoFar"
|
||||
*/
|
||||
bool operator()(EOT & _sol, Neighbor & _neighbor) {
|
||||
bool operator()(EOT & /*_sol*/, Neighbor & _neighbor) {
|
||||
return (bestFoundSoFar.fitness() < _neighbor.fitness());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public:
|
|||
* Init all the counters
|
||||
* @param _sol unused solution
|
||||
*/
|
||||
void init(EOT & _sol) {
|
||||
void init(EOT & /*_sol*/) {
|
||||
nbMove=0;
|
||||
nbNoMove=0;
|
||||
counter=0;
|
||||
|
|
@ -55,7 +55,7 @@ public:
|
|||
* @param _sol unused solution
|
||||
* @param _neighbor unused neighbor
|
||||
*/
|
||||
void add(EOT & _sol, Neighbor & _neighbor) {
|
||||
void add(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {
|
||||
nbMove++;
|
||||
counter=0;
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ public:
|
|||
* @param _sol unused solution
|
||||
* @param _neighbor unused neighbor
|
||||
*/
|
||||
void update(EOT & _sol, Neighbor & _neighbor) {
|
||||
void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {
|
||||
nbNoMove++;
|
||||
counter++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,17 +44,17 @@ public:
|
|||
/**
|
||||
* Init : NOTHIING TO DO
|
||||
*/
|
||||
void init(EOT & _sol) {}
|
||||
void init(EOT & /*_sol*/) {}
|
||||
|
||||
/**
|
||||
* Add : NOTHIING TO DO
|
||||
*/
|
||||
void add(EOT & _sol, Neighbor & _neighbor) {}
|
||||
void add(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {}
|
||||
|
||||
/**
|
||||
* Update : NOTHIING TO DO
|
||||
*/
|
||||
void update(EOT & _sol, Neighbor & _neighbor) {}
|
||||
void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {}
|
||||
|
||||
/**
|
||||
* ClearMemory : NOTHIING TO DO
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public:
|
|||
* init the tabuList by clearing the memory
|
||||
* @param _sol the current solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
clearMemory();
|
||||
}
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ public:
|
|||
* @param _sol unused solution
|
||||
* @param _neighbor the current neighbor
|
||||
*/
|
||||
virtual void add(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void add(EOT & /*_sol*/, Neighbor & _neighbor) {
|
||||
if (_neighbor.index() < maxSize) {
|
||||
if (robust)
|
||||
// random value between min and max
|
||||
|
|
@ -98,7 +98,7 @@ public:
|
|||
* @param _sol unused solution
|
||||
* @param _neighbor unused neighbor
|
||||
*/
|
||||
virtual void update(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {
|
||||
for (unsigned int i = 0; i < maxSize; i++)
|
||||
if (tabuList[i] > 0)
|
||||
tabuList[i]--;
|
||||
|
|
@ -110,7 +110,7 @@ public:
|
|||
* @param _neighbor the current neighbor
|
||||
* @return true if tabuList contains _sol
|
||||
*/
|
||||
virtual bool check(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual bool check(EOT & /*_sol*/, Neighbor & _neighbor) {
|
||||
return (tabuList[_neighbor.index()] > 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
* init the tabuList by clearing the memory
|
||||
* @param _sol the current solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
clearMemory();
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ public:
|
|||
* @param _sol unused solution
|
||||
* @param _neighbor the current neighbor
|
||||
*/
|
||||
virtual void add(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void add(EOT & /*_sol*/, Neighbor & _neighbor) {
|
||||
|
||||
if (tabuList.size() < maxSize) {
|
||||
std::pair<Neighbor, unsigned int> tmp;
|
||||
|
|
@ -87,7 +87,7 @@ public:
|
|||
* @param _sol unused solution
|
||||
* @param _neighbor unused neighbor
|
||||
*/
|
||||
virtual void update(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {
|
||||
if (howlong > 0)
|
||||
for (unsigned int i=0; i<tabuList.size(); i++)
|
||||
if (tabuList[i].second > 0)
|
||||
|
|
@ -100,7 +100,7 @@ public:
|
|||
* @param _neighbor the current neighbor
|
||||
* @return true if tabuList contains _sol
|
||||
*/
|
||||
virtual bool check(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual bool check(EOT & /*_sol*/, Neighbor & _neighbor) {
|
||||
for (unsigned int i=0; i<tabuList.size(); i++) {
|
||||
if ((howlong > 0 && tabuList[i].second > 0 && tabuList[i].first.equals(_neighbor)) || (howlong==0 && tabuList[i].first.equals(_neighbor)))
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public:
|
|||
* @param _sol unused solution
|
||||
* @param _neighbor the current neighbor
|
||||
*/
|
||||
virtual void add(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void add(EOT & /*_sol*/, Neighbor & _neighbor) {
|
||||
if (_neighbor.index() < maxSize)
|
||||
tabuList[_neighbor.index()] = howlong + rng.uniform(howlongRnd) ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
* init the tabuList by clearing the memory
|
||||
* @param _sol the current solution
|
||||
*/
|
||||
virtual void init(EOT & _sol) {
|
||||
virtual void init(EOT & /*_sol*/) {
|
||||
clearMemory();
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ public:
|
|||
* @param _sol the current solution
|
||||
* @param _neighbor unused neighbor
|
||||
*/
|
||||
virtual void add(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void add(EOT & _sol, Neighbor & /*_neighbor*/) {
|
||||
|
||||
if (tabuList.size() < maxSize) {
|
||||
std::pair<EOT, unsigned int> tmp;
|
||||
|
|
@ -87,7 +87,7 @@ public:
|
|||
* @param _sol the current solution
|
||||
* @param _neighbor the current neighbor (unused)
|
||||
*/
|
||||
virtual void update(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {
|
||||
if (howlong > 0)
|
||||
for (unsigned int i=0; i<tabuList.size(); i++)
|
||||
if (tabuList[i].second > 0)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
* @param _solution the current solution
|
||||
* @return true if there is some heuristics
|
||||
*/
|
||||
virtual bool cont(EOT& _solution){
|
||||
virtual bool cont(EOT& /*_solution*/){
|
||||
return (cycle || (current > 0));
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ public:
|
|||
*
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void init(EOT& _solution){
|
||||
virtual void init(EOT& /*_solution*/){
|
||||
current = LSvector.size() - 1;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ public:
|
|||
*
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void next(EOT& _solution){
|
||||
virtual void next(EOT& /*_solution*/){
|
||||
current = (current + LSvector.size() -1) % LSvector.size();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ public:
|
|||
* NOTHING TO DO
|
||||
* @param _solution the related solution
|
||||
*/
|
||||
virtual void move(EOT& _solution) {}
|
||||
virtual void move(EOT& /*_solution*/) {}
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
* @param _solution unused solution
|
||||
* @return always false
|
||||
*/
|
||||
virtual bool hasNeighbor(EOT & _solution) {
|
||||
virtual bool hasNeighbor(EOT & /*_solution*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -55,21 +55,21 @@ public:
|
|||
* @param _solution unused solution
|
||||
* @param _current unused neighbor
|
||||
*/
|
||||
virtual void init(EOT & _solution, Neighbor & _current) {}
|
||||
virtual void init(EOT & /*_solution*/, Neighbor & /*_current*/) {}
|
||||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
* @param _current unused neighbor
|
||||
*/
|
||||
virtual void next(EOT & _solution, Neighbor & _current) {}
|
||||
virtual void next(EOT & /*_solution*/, Neighbor & /*_current*/) {}
|
||||
|
||||
/**
|
||||
* NOTHING TO DO
|
||||
* @param _solution unused solution
|
||||
* @return always false
|
||||
*/
|
||||
virtual bool cont(EOT & _solution) {
|
||||
virtual bool cont(EOT & /*_solution*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
* @param _solution the current solution
|
||||
* @return true if there is some heuristics
|
||||
*/
|
||||
virtual bool cont(EOT& _solution){
|
||||
virtual bool cont(EOT& /*_solution*/){
|
||||
return (cycle || (current <= (LSvector.size() - 2)));
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ public:
|
|||
*
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void init(EOT& _solution){
|
||||
virtual void init(EOT& /*_solution*/){
|
||||
current = 0;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ public:
|
|||
*
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void next(EOT& _solution){
|
||||
virtual void next(EOT& /*_solution*/){
|
||||
current = (current + 1) % LSvector.size();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public:
|
|||
* @param _solution solution from which the neighborhood is visited
|
||||
* @param _key index of the IndexNeighbor
|
||||
*/
|
||||
virtual void index(EOT & _solution, unsigned int _key) {
|
||||
virtual void index(EOT & /*_solution*/, unsigned int _key) {
|
||||
key = _key;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
* @param _neighbor a neighbor
|
||||
* @return if _neighbor and this one are equals
|
||||
*/
|
||||
virtual bool equals(moNeighbor<EOT, Fitness> & _neighbor) {
|
||||
virtual bool equals(moNeighbor<EOT, Fitness> & /*_neighbor*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @return true if the neighborhood was not empty
|
||||
*/
|
||||
virtual bool hasNeighbor(EOT& _solution) {
|
||||
virtual bool hasNeighbor(EOT& /*_solution*/) {
|
||||
return getNeighborhoodSize() > 0;
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @return true if there is again a neighbor to explore
|
||||
*/
|
||||
virtual bool cont(EOT & _solution) {
|
||||
virtual bool cont(EOT & /*_solution*/) {
|
||||
return (currentIndex < getNeighborhoodSize() - 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
* @param _solution the current solution
|
||||
* @return true if there is some heuristics
|
||||
*/
|
||||
virtual bool cont(EOT& _solution){
|
||||
virtual bool cont(EOT& /*_solution*/){
|
||||
return ( cycle || (currentOrder <= (order.size() - 2)) );
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ public:
|
|||
*
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void init(EOT& _solution) {
|
||||
virtual void init(EOT& /*_solution*/) {
|
||||
if(order.size() == 0)
|
||||
for(unsigned int i = 0; i < LSvector.size(); i++)
|
||||
order.push_back(i);
|
||||
|
|
@ -98,7 +98,7 @@ public:
|
|||
*
|
||||
* @param _solution the current solution
|
||||
*/
|
||||
virtual void next(EOT& _solution){
|
||||
virtual void next(EOT& /*_solution*/){
|
||||
currentOrder = (currentOrder + 1) % order.size();
|
||||
|
||||
current = order[currentOrder];
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @return true if the neighborhood was not empty
|
||||
*/
|
||||
virtual bool hasNeighbor(EOT& _solution) {
|
||||
virtual bool hasNeighbor(EOT& /*_solution*/) {
|
||||
return neighborhoodSize > 0;
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @return true if there is again a neighbor to explore
|
||||
*/
|
||||
virtual bool cont(EOT & _solution) {
|
||||
virtual bool cont(EOT & /*_solution*/) {
|
||||
if (maxNeighbors == 0)
|
||||
return neighborhoodSize > 0;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @return true if the neighborhood was not empty
|
||||
*/
|
||||
virtual bool hasNeighbor(EOT& _solution) {
|
||||
virtual bool hasNeighbor(EOT& /*_solution*/) {
|
||||
return neighborhoodSize > 0;
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @return true if there is again a neighbor to explore
|
||||
*/
|
||||
virtual bool cont(EOT & _solution) {
|
||||
virtual bool cont(EOT & /*_solution*/) {
|
||||
return (maxIndex > 0) ;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
* @param _sol the current solution
|
||||
* @param _neighbor unused neighbor (always empty)
|
||||
*/
|
||||
virtual void add(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void add(EOT & _sol, Neighbor & /*_neighbor*/) {
|
||||
(*this).init(_sol);
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ public:
|
|||
* @param _sol the current solution
|
||||
* @param _neighbor unused neighbor (always empty)
|
||||
*/
|
||||
virtual void update(EOT & _sol, Neighbor & _neighbor) {
|
||||
virtual void update(EOT & _sol, Neighbor & /*_neighbor*/) {
|
||||
if (otherNeighborhood.cont(_sol))
|
||||
otherNeighborhood.next(_sol, current);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -98,13 +98,13 @@ public:
|
|||
* @param _neighbor the first neighbor
|
||||
* @param _n Hamming distance of the neighbor
|
||||
*/
|
||||
virtual void randomNeighbor(EOT & _solution, Neighbor & _neighbor, unsigned _n) {
|
||||
virtual void randomNeighbor(EOT & /*_solution*/, Neighbor & _neighbor, unsigned _n) {
|
||||
_neighbor.bits.resize(_n);
|
||||
_neighbor.nBits = _n;
|
||||
|
||||
unsigned i;
|
||||
unsigned b;
|
||||
unsigned tmp;
|
||||
// unsigned tmp;
|
||||
|
||||
for(unsigned k = 0; k < _n; k++) {
|
||||
i = rng.random(length - k);
|
||||
|
|
@ -167,7 +167,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @return true if there is again a neighbor to explore: population size larger or equals than 1
|
||||
*/
|
||||
virtual bool cont(EOT & _solution) {
|
||||
virtual bool cont(EOT & /*_solution*/) {
|
||||
return nNeighbors < sampleSize ;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @param _neighbor the first neighbor
|
||||
*/
|
||||
virtual void init(EOT & _solution, Neighbor & _neighbor) {
|
||||
virtual void init(EOT & /*_solution*/, Neighbor & _neighbor) {
|
||||
maxIndex = neighborhoodSize ;
|
||||
|
||||
unsigned i = rng.random(maxIndex);
|
||||
|
|
@ -163,7 +163,7 @@ public:
|
|||
* @param _solution the solution to explore (population of solutions)
|
||||
* @param _neighbor the next neighbor which in order of distance
|
||||
*/
|
||||
virtual void next(EOT & _solution, Neighbor & _neighbor) {
|
||||
virtual void next(EOT & /*_solution*/, Neighbor & _neighbor) {
|
||||
unsigned i = rng.random(maxIndex);
|
||||
key = indexVector[i];
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @return true if there is again a neighbor to explore: population size larger or equals than 1
|
||||
*/
|
||||
virtual bool cont(EOT & _solution) {
|
||||
virtual bool cont(EOT & /*_solution*/) {
|
||||
return neighborhoodSize - maxIndex < sampleSize ;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @param _current the first neighbor
|
||||
*/
|
||||
virtual void init(EOT& _solution, Neighbor& _current) {
|
||||
virtual void init(EOT& /*_solution*/, Neighbor& _current) {
|
||||
indices.first=0;
|
||||
indices.second=1;
|
||||
_current.setIndices(0,1);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
* @param _solution the solution to explore
|
||||
* @param _current the first neighbor
|
||||
*/
|
||||
virtual void init(EOT& _solution, Neighbor& _current) {
|
||||
virtual void init(EOT& /*_solution*/, Neighbor& _current) {
|
||||
indices.first=0;
|
||||
indices.second=1;
|
||||
_current.setIndices(0,1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue