Nettoyage et documentation des classes de bases

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1653 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-01-19 10:42:01 +00:00
commit 31c6fe9888
9 changed files with 224 additions and 177 deletions

View file

@ -1,40 +1,74 @@
#ifndef _neighborhoodExplorer_h
#define _neighborhoodExplorer_h
//EO inclusion
#include <eoFunctor.h>
#include <neighborhood/moNeighborhood.h>
/*
explore the neighborhood
*/
* Explore the neighborhood
*/
template< class NH >
class moNeighborhoodExplorer : public eoUF<typename NH::EOT & , void>
class moNeighborhoodExplorer : public eoUF<typename NH::EOT&, void>
{
public:
typedef NH Neighborhood ;
typedef typename Neighborhood::EOT EOT ;
typedef typename Neighborhood::Neighbor Neighbor ;
// empty constructor
moNeighborhoodExplorer() { } ;
/*
* Constructor with a Neighborhood and evaluation function
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
*/
moNeighborhoodExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval):neighborhood(_neighborhood), eval(_eval) {}
// empty constructor
moNeighborhoodExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval):neighborhood(_neighborhood), eval(_eval) { } ;
/*
* Init Search parameters
* @param _solution the solution to explore
*/
virtual void initParam (EOT& _solution) = 0 ;
virtual void initParam (EOT & solution) = 0 ;
/*
* Update Search parameters
* @param _solution the solution to explore
*/
virtual void updateParam (EOT& _solution) = 0 ;
virtual void updateParam (EOT & solution) = 0 ;
/*
* Test if the exploration continue or not
* @param _solution the solution to explore
* @return true if the exploration continue, else return false
*/
virtual bool isContinue(EOT& _solution) = 0 ;
virtual bool isContinue(EOT & solution) = 0 ;
/*
* Move a solution
* @param _solution the solution to explore
*/
virtual void move(EOT& _solution) = 0 ;
virtual void move(EOT & solution) = 0 ;
/*
* Test if a solution is accepted
* @param _solution the solution to explore
* @return true if the solution is accepted, else return false
*/
virtual bool accept(EOT& _solution) = 0 ;
virtual bool accept(EOT & solution) = 0 ;
/*
* Terminate the search
* @param _solution the solution to explore
*/
virtual void terminate(EOT& _solution) = 0 ;
virtual void terminate(EOT & solution) = 0 ;
/** Return the class id.
* @return the class name as a std::string
*/
virtual std::string className() const { return "moNeighborhoodExplorer"; }
/*
* Return the class id.
* @return the class name as a std::string
*/
virtual std::string className() const {
return "moNeighborhoodExplorer";
}
protected:
Neighborhood & neighborhood;
@ -42,14 +76,4 @@ protected:
};
#endif
// Local Variables:
// coding: iso-8859-1
// mode: C++
// c-file-offsets: ((c . 0))
// c-file-style: "Stroustrup"
// fill-column: 80
// End: