Added wonderful test stuff

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@594 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2007-09-18 15:45:15 +00:00
commit 31a487ec4a
23 changed files with 307 additions and 312 deletions

View file

@ -1,6 +1,6 @@
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
// "moGenSolContinue.h"
// "eoGenSolContinue.h"
// (c) OPAC Team, LIFL, 2003-2006
@ -14,43 +14,47 @@
#include "moSolContinue.h"
//! One possible stopping criterion for a solution-based heuristic.
//! One possible stop criterion for a solution-based heuristic.
/*!
The stopping criterion corresponds to a maximum number of iteration.
The stop criterion corresponds to a maximum number of iteration.
*/
template < class EOT > class moGenSolContinue:public moSolContinue < EOT >
{
public:
//! Basic constructor.
//! Simple constructor.
/*!
\param __maxNumGen the maximum number of generation.
*/
moGenSolContinue (unsigned int __maxNumGen):maxNumGen (__maxNumGen), numGen (0)
{}
{
}
//! Function that activates the stop criterion.
/*!
Increments the counter and returns true if the
Increments the counter and returns TRUE if the
current number of iteration is lower than the given
maximum number of iterations.
\param __sol the current solution.
\return true or false according to the current generation number.
\return TRUE or FALSE according to the current generation number.
*/
bool operator () (const EOT & __sol)
bool operator () (const EOT & __sol)
{
return (++numGen < maxNumGen);
}
//! Procedure which allows to initialise all the stuff needed.
//! Procedure which allows to initialise the generation counter.
/*!
It can be also used to reinitialize the counter all the needed things.
*/
It can also be used to reset the iteration counter.
*/
void init ()
{
numGen=0;
numGen = 0;
}
private: