Passage du code dans un pretty printer

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1813 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-05-17 14:56:42 +00:00
commit 3d8057ac4d
88 changed files with 2726 additions and 2720 deletions

View file

@ -37,7 +37,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
/**
* Continue until a maximum fixed number of neighbor evaluation is reached
*
* Becareful 1: The number of full evaluations considered is within the local search (not before it)
* Becareful 1: The number of full evaluations considered is within the local search (not before it)
* Becareful 2: Can not be used if the evaluation function is used in parallel
*/
template< class Neighbor >
@ -46,42 +46,42 @@ class moNeighborEvalContinuator : public moContinuator<Neighbor>
public:
typedef typename Neighbor::EOT EOT ;
/**
* Default constructor
* @param _eval neighbor evaluation function to count
* @param _maxNeighborEval number maximum of iterations
*/
moNeighborEvalContinuator(moEvalCounter<Neighbor> & _eval, unsigned int _maxNeighborEval): eval(_eval), maxNeighborEval(_maxNeighborEval){}
/**
* Default constructor
* @param _eval neighbor evaluation function to count
* @param _maxNeighborEval number maximum of iterations
*/
moNeighborEvalContinuator(moEvalCounter<Neighbor> & _eval, unsigned int _maxNeighborEval): eval(_eval), maxNeighborEval(_maxNeighborEval) {}
/**
* Test if continue
* @param _solution a solution
* @return true if number of evaluations < maxNeighborEval
*/
virtual bool operator()(EOT & _solution) {
return (eval.value() - nbEval_start < maxNeighborEval);
}
/**
* Reset the number of evaluations
* @param _solution a solution
*/
virtual void init(EOT & _solution) {
nbEval_start = eval.value();
}
/**
* the current number of evaluation from the begining
* @return the number of evaluation
*/
unsigned int value() {
return eval.value() - nbEval_start ;
}
/**
* Test if continue
* @param _solution a solution
* @return true if number of evaluations < maxNeighborEval
*/
virtual bool operator()(EOT & _solution) {
return (eval.value() - nbEval_start < maxNeighborEval);
}
/**
* Reset the number of evaluations
* @param _solution a solution
*/
virtual void init(EOT & _solution) {
nbEval_start = eval.value();
}
/**
* the current number of evaluation from the begining
* @return the number of evaluation
*/
unsigned int value() {
return eval.value() - nbEval_start ;
}
private:
moEvalCounter<Neighbor> & eval;
unsigned int maxNeighborEval;
unsigned int nbEval_start ;
moEvalCounter<Neighbor> & eval;
unsigned int maxNeighborEval;
unsigned int nbEval_start ;
};
#endif