Fin du nettoyage

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1812 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-05-17 14:15:13 +00:00
commit cc31901008
46 changed files with 417 additions and 546 deletions

View file

@ -1295,7 +1295,7 @@ SKIP_FUNCTION_MACROS = YES
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
TAGFILES = @PARADISEO_EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/eo/doc/html
TAGFILES = @EO_BIN_DIR@/doc/eo.doxytag=http://eodev.sourceforge.net/eo/doc/html
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.

View file

@ -55,12 +55,6 @@ public:
moStat(T _value, std::string _description):
eoValueParam<T>(_value, _description) {}
// /**
// * @return name of the class
// */
// virtual std::string className(void) const {
// return "moStat";
// }
};

View file

@ -48,6 +48,7 @@ public :
/**
* Default Constructor
* @param _stat a stat
*/
moStatFromStat(moStat<EOT,T> & _stat): moStat<EOT, T>(0, _stat.description()), stat(_stat) {
}

View file

@ -44,7 +44,8 @@ public:
/**
* Ctor.
* @param _max maximum running time
* @param _max maximum running time$
* @param _verbose verbose mode true/false -> on/off
*/
moTimeContinuator(time_t _max, bool _verbose=true): max(_max), verbose(_verbose){
start = time(NULL);

View file

@ -50,8 +50,8 @@ public:
moTrueContinuator() {} ;
/**
*@param _solution a solution
*@return always true
* @param _solution a solution
* @return always true
*/
virtual bool operator()(EOT & _solution) {
return true;

View file

@ -72,7 +72,7 @@ public:
/**
* Default Constructor
* @param _param the parameter of type EOT to save in the vector
* @param _param the parameter of type eoScalarFitness to save in the vector
*/
template <class ScalarType, class Compare>
moVectorMonitor(eoValueParam<eoScalarFitness<ScalarType, Compare> > & _param) : doubleParam( & (eoValueParam<double>&)_param), intParam(NULL), eotParam(NULL)
@ -80,7 +80,7 @@ public:
/**
* Default Constructor
* @param _param the parameter of type EOT to save in the vector
* @param _param unvalid Parameter
*/
template <class T>
moVectorMonitor(eoValueParam<T> & _param) : doubleParam(NULL), intParam(NULL), eotParam(NULL)

View file

@ -52,8 +52,7 @@ public:
* @param _span number of iteration with equal temperature
* @param _finalT final temperature, threshold of the stopping criteria
*/
moSimpleCoolingSchedule(double _initT, double _alpha, unsigned _span, double _finalT) : initT(_initT), alpha(_alpha), span(_span), finalT(_finalT) {
}
moSimpleCoolingSchedule(double _initT, double _alpha, unsigned _span, double _finalT) : initT(_initT), alpha(_alpha), span(_span), finalT(_finalT) {}
/**
* Initial temperature

View file

@ -43,7 +43,8 @@ public:
/**
* NOTHING TO DO
* @param _sol a solution
* @param _sol a solution (unused)
* @param _n a neighbor (unused)
*/
void operator()(EOT& _sol, Neighbor& _n){}

View file

@ -51,46 +51,46 @@ public:
moDummyExplorer(): moNeighborhoodExplorer<Neighbor>() { }
/**
* Init Search parameters
* @param _solution the solution to explore
* NOTHING TO DO
* @param _solution a solution (unused)
*/
void initParam (EOT& _solution) { } ;
/**
* Update Search parameters
* @param _solution the solution to explore
* NOTHING TO DO
* @param _solution a solution (unused)
*/
void updateParam (EOT& _solution) { } ;
/**
* Test if the exploration continue or not
* @param _solution the solution to explore
* @return true if the exploration continue, else return false
* NOTHING TO DO
* @param _solution a solution (unused)
* @return always false
*/
bool isContinue(EOT& _solution) { return false; } ;
/**
* Move a solution
* @param _solution the solution to explore
* NOTHING TO DO
* @param _solution a solution (unused)
*/
void move(EOT& _solution) { } ;
/**
* Test if a solution is accepted
* @param _solution the solution to explore
* @return true if the solution is accepted, else return false
* NOTHING TO DO
* @param _solution a solution (unused)
* @return always false
*/
virtual bool accept(EOT& _solution) { return false; } ;
/**
* Terminate the search
* @param _solution the solution to explore
* NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void terminate(EOT& _solution) { } ;
/**
* Explore the neighborhood of a solution
* @param _solution
* NOTHING TO DO
* @param _solution a solution (unused)
*/
void operator()(EOT & _solution) { }

View file

@ -41,7 +41,7 @@
#include <neighborhood/moNeighborhood.h>
/**
* Explorer for a first imporvement heuristic
* Explorer for a first improvement heuristic
*/
template< class Neighbor>
class moFirstImprHCexplorer : public moNeighborhoodExplorer<Neighbor>
@ -74,21 +74,24 @@ public:
/**
* initParam: NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void initParam(EOT & solution) {};
virtual void initParam(EOT & _solution) {};
/**
* updateParam: NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void updateParam(EOT & solution) {};
virtual void updateParam(EOT & _solution) {};
/**
* terminate: NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void terminate(EOT & solution) {};
virtual void terminate(EOT & _solution) {};
/**
* Explore the neighborhood of a solution
* Explore the neighborhood of a solution until an ameliorated neighbor is found
* @param _solution
*/
virtual void operator()(EOT & _solution) {
@ -136,7 +139,7 @@ public:
};
/**
* accept test if an amelirated neighbor was be found
* accept test if an ameliorated neighbor was be found
* @param _solution the solution
* @return true if the best neighbor ameliorate the fitness
*/

View file

@ -98,12 +98,13 @@ public:
/**
* terminate: NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void terminate(EOT & _solution){};
/**
* Explore the neighborhood of a solution
* @param _solution
* Perturb and apply local search on a solution
* @param _solution the solution
*/
virtual void operator()(EOT & _solution){
//copy the solution to perform new local search
@ -132,8 +133,8 @@ public:
};
/**
* move the solution with the best neighbor
* @param _solution the solution to move
* copy the solution found by the local search
* @param _solution the solution
*/
virtual void move(EOT & _solution) {
_solution=current;

View file

@ -119,14 +119,6 @@ public:
isMoved=_isMoved;
}
/**
* Return the class id.
* @return the class name as a std::string
*/
// virtual std::string className() const {
// return "moNeighborhoodExplorer";
// }
protected:
moDummyNeighborhood<Neighbor> dummyNeighborhood;
moDummyEval<Neighbor> dummyEval;

View file

@ -70,8 +70,7 @@ public:
moNeighborComparator<Neighbor>& _neighborComparator,
moSolNeighborComparator<Neighbor>& _solNeighborComparator,
unsigned _nbStep) :
moRandomBestHCexplorer<Neighbor>(_neighborhood, _eval, _neighborComparator, _solNeighborComparator),
nbStep(_nbStep) {
moRandomBestHCexplorer<Neighbor>(_neighborhood, _eval, _neighborComparator, _solNeighborComparator),nbStep(_nbStep) {
//Some cycle is possible with equals fitness solutions if the neighborhood is not random
}
@ -83,18 +82,20 @@ public:
/**
* initial number of step
* @param _solution the current solution
*/
virtual void initParam(EOT & solution) {
moRandomBestHCexplorer<Neighbor>::initParam(solution);
virtual void initParam(EOT & _solution) {
moRandomBestHCexplorer<Neighbor>::initParam(_solution);
step = 0;
};
/**
* one more step
* @param _solution the current solution
*/
virtual void updateParam(EOT & solution) {
moRandomBestHCexplorer<Neighbor>::updateParam(solution);
virtual void updateParam(EOT & _solution) {
moRandomBestHCexplorer<Neighbor>::updateParam(_solution);
step++;
};
@ -109,7 +110,7 @@ public:
};
/**
* accept test if an ameliorated neighbor was be found
* accept test if an ameliorated or an equal neighbor was be found
* @param _solution the solution
* @return true if the best neighbor ameliorate the fitness or is equals
*/

View file

@ -83,28 +83,31 @@ public:
/**
* empty the vector of best solutions
* @param _solution a solution (unused)
*/
virtual void initParam(EOT & solution) {
virtual void initParam(EOT & _solution) {
// delete all the best solutions
bestVector.clear();
};
/**
* empty the vector of best solutions
* @param _solution a solution (unused)
*/
virtual void updateParam(EOT & solution) {
virtual void updateParam(EOT & _solution) {
// delete all the best solutions
bestVector.clear();
};
/**
* terminate: NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void terminate(EOT & solution) {};
virtual void terminate(EOT & _solution) {};
/**
* Explore the neighborhood of a solution
* @param _solution
* @param _solution the current solution
*/
virtual void operator()(EOT & _solution) {

View file

@ -62,7 +62,8 @@ public:
* @param _solNeighborComparator a solution vs neighbor comparator
* @param _nbStep maximum number of step to do
*/
moRandomNeutralWalkExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval,
moRandomNeutralWalkExplorer(Neighborhood& _neighborhood,
moEval<Neighbor>& _eval,
moSolNeighborComparator<Neighbor>& _solNeighborComparator,
unsigned _nbStep):
moNeighborhoodExplorer<Neighbor>(_neighborhood, _eval),
@ -84,23 +85,26 @@ public:
/**
* initialization of the number of step to be done
* @param _solution a solution (unused)
*/
virtual void initParam(EOT & solution) {
virtual void initParam(EOT & _solution) {
step = 0;
isAccept = true;
};
/**
* increase the number of step
* @param _solution a solution (unused)
*/
virtual void updateParam(EOT & solution) {
virtual void updateParam(EOT & _solution) {
step++;
};
/**
* terminate: NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void terminate(EOT & solution) {};
virtual void terminate(EOT & _solution) {};
/**
* Explore the neighborhood of a solution
@ -135,7 +139,7 @@ public:
* @return true there is some steps to do
*/
virtual bool isContinue(EOT & _solution) {
return (step < nbStep) && isAccept ;
return (step < nbStep) && isAccept ;
};
/**
@ -150,7 +154,7 @@ public:
};
/**
* accept test if an ameliorated neighbor was be found
* accept test if an equals neighbor was be found
* @param _solution the solution
* @return true if the best neighbor ameliorate the fitness
*/

View file

@ -57,7 +57,7 @@ public:
/**
* Constructor
* @param _init the solution initializer, to explore at random the search space
* @param _eval the evaluation function
* @param _fulleval the evaluation function
* @param _nbStep maximum number of step to do
*/
moRandomSearchExplorer(eoInit<EOT>& _init, eoEvalFunc<EOT>& _fulleval, unsigned _nbStep) : moNeighborhoodExplorer<Neighbor>(), init(_init), fulleval(_fulleval), nbStep(_nbStep) {
@ -68,27 +68,29 @@ public:
/**
* Destructor
*/
~moRandomSearchExplorer() {
}
~moRandomSearchExplorer() {}
/**
* initialization of the number of step to be done
* @param _solution a solution (unused)
*/
virtual void initParam(EOT & solution) {
virtual void initParam(EOT & _solution) {
step = 0;
};
/**
* increase the number of step
* @param _solution a solution (unused)
*/
virtual void updateParam(EOT & solution) {
virtual void updateParam(EOT & _solution) {
step++;
};
/**
* terminate: NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void terminate(EOT & solution) {};
virtual void terminate(EOT & _solution) {};
/**
* Explore the neighborhood with only one random solution

View file

@ -78,28 +78,31 @@ public:
/**
* initialization of the number of step to be done
* @param _solution a solution (unused)
*/
virtual void initParam(EOT & solution) {
virtual void initParam(EOT & _solution) {
step = 0;
isAccept = true;
};
/**
* increase the number of step
* @param _solution a solution (unused)
*/
virtual void updateParam(EOT & solution) {
virtual void updateParam(EOT & _solution) {
step++;
};
/**
* terminate: NOTHING TO DO
* @param _solution a solution (unused)
*/
virtual void terminate(EOT & solution) {};
virtual void terminate(EOT & _solution) {};
/**
* Explore the neighborhood with only one random solution
* we supposed that the first neighbor is uniformly selected in the neighborhood
* @param _solution
* @param _solution a solution
*/
virtual void operator()(EOT & _solution) {

View file

@ -64,9 +64,8 @@ public:
* Constructor
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _neighborComparator a neighbor comparator
* @param _solNeighborComparator a solution vs neighbor comparator
* @param _nbStep maximum number of step to do
* @param _coolingSchedule the cooling schedule
*/
moSAexplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, moSolNeighborComparator<Neighbor>& _solNeighborComparator, moCoolingSchedule<EOT>& _coolingSchedule) : moNeighborhoodExplorer<Neighbor>(_neighborhood, _eval), solNeighborComparator(_solNeighborComparator), coolingSchedule(_coolingSchedule) {
isAccept = false;
@ -168,6 +167,10 @@ public:
return isAccept;
};
/**
* Getter
* @return the temperature
*/
double getTemperature(){
return temperature;
}

View file

@ -1,3 +1,33 @@
/*
<moAspiration.h>
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can ue,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
Contact: paradiseo-help@lists.gforge.inria.fr
*/
#ifndef _moAspiration_h
#define _moAspiration_h
@ -12,7 +42,17 @@ class moAspiration : public eoBF<typename Neighbor::EOT &, Neighbor &, bool>
public:
typedef typename Neighbor::EOT EOT;
/**
* Virtual Init
* @param _sol the current solution
*/
virtual void init(EOT & _sol) = 0;
/**
* Virtual update
* @param _sol the current solution
* @param _neighbor the current neighbor
*/
virtual void update(EOT & _sol, Neighbor & _neighbor) = 0;
};

View file

@ -1,3 +1,33 @@
/*
<moBestImprAspiration.h>
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can ue,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
Contact: paradiseo-help@lists.gforge.inria.fr
*/
#ifndef _moBestImprAspiration_h
#define _moBestImprAspiration_h

Some files were not shown because too many files have changed in this diff Show more