From cc31901008236016bd1a6d753e7a7fef2bbbbf82 Mon Sep 17 00:00:00 2001 From: jhumeau Date: Mon, 17 May 2010 14:15:13 +0000 Subject: [PATCH] Fin du nettoyage git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1812 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-mo/doc/mo.doxyfile.cmake | 2 +- trunk/paradiseo-mo/src/continuator/moStat.h | 6 - .../src/continuator/moStatFromStat.h | 1 + .../src/continuator/moTimeContinuator.h | 3 +- .../src/continuator/moTrueContinuator.h | 4 +- .../src/continuator/moVectorMonitor.h | 4 +- .../coolingSchedule/moSimpleCoolingSchedule.h | 3 +- trunk/paradiseo-mo/src/eval/moDummyEval.h | 3 +- .../src/explorer/moDummyExplorer.h | 32 ++--- .../src/explorer/moFirstImprHCexplorer.h | 15 +- .../paradiseo-mo/src/explorer/moILSexplorer.h | 9 +- .../src/explorer/moNeighborhoodExplorer.h | 8 -- .../src/explorer/moNeutralHCexplorer.h | 15 +- .../src/explorer/moRandomBestHCexplorer.h | 11 +- .../explorer/moRandomNeutralWalkExplorer.h | 16 ++- .../src/explorer/moRandomSearchExplorer.h | 14 +- .../src/explorer/moRandomWalkExplorer.h | 11 +- .../paradiseo-mo/src/explorer/moSAexplorer.h | 7 +- trunk/paradiseo-mo/src/memory/moAspiration.h | 40 ++++++ .../src/memory/moBestImprAspiration.h | 30 ++++ .../src/memory/moCountMoveMemory.h | 2 +- .../src/memory/moDiversification.h | 32 ++++- .../src/memory/moDummyDiversification.h | 29 ++++ .../src/memory/moDummyIntensification.h | 29 ++++ .../src/memory/moIntensification.h | 32 ++++- .../src/memory/moSolVectorTabuList.h | 29 ++++ trunk/paradiseo-mo/src/memory/moTabuList.h | 29 ++++ trunk/paradiseo-mo/src/mo.h | 130 +++++++++--------- .../src/neighborhood/moDummyNeighborhood.h | 12 +- .../src/neighborhood/moIndexNeighbor.h | 2 + .../src/neighborhood/moIndexNeighborhood.h | 9 +- .../src/neighborhood/moNeighborhood.h | 2 +- .../src/neighborhood/moRndNeighborhood.h | 6 + .../paradiseo-mo/src/old/moIncrEvalWrapper.h | 34 ----- trunk/paradiseo-mo/src/old/moMove.h | 57 -------- trunk/paradiseo-mo/src/old/moMoveIncrEval.h | 52 ------- trunk/paradiseo-mo/src/old/moMoveInit.h | 50 ------- trunk/paradiseo-mo/src/old/moMoveNeighbor.h | 71 ---------- .../paradiseo-mo/src/old/moMoveNeighborhood.h | 61 -------- trunk/paradiseo-mo/src/old/moNextMove.h | 50 ------- .../paradiseo-mo/src/perturb/moPerturbation.h | 3 +- .../src/perturb/moRestartPerturb.h | 2 +- trunk/paradiseo-mo/src/perturb/moSolInit.h | 4 +- .../src/problems/eval/moOneMaxIncrEval.h | 8 +- .../paradiseo-mo/src/sampling/moFDCsampling.h | 2 +- .../src/sampling/moHillClimberSampling.h | 2 + 46 files changed, 422 insertions(+), 551 deletions(-) delete mode 100644 trunk/paradiseo-mo/src/old/moIncrEvalWrapper.h delete mode 100644 trunk/paradiseo-mo/src/old/moMove.h delete mode 100644 trunk/paradiseo-mo/src/old/moMoveIncrEval.h delete mode 100644 trunk/paradiseo-mo/src/old/moMoveInit.h delete mode 100644 trunk/paradiseo-mo/src/old/moMoveNeighbor.h delete mode 100644 trunk/paradiseo-mo/src/old/moMoveNeighborhood.h delete mode 100644 trunk/paradiseo-mo/src/old/moNextMove.h diff --git a/trunk/paradiseo-mo/doc/mo.doxyfile.cmake b/trunk/paradiseo-mo/doc/mo.doxyfile.cmake index 862e9e731..9207eea7b 100644 --- a/trunk/paradiseo-mo/doc/mo.doxyfile.cmake +++ b/trunk/paradiseo-mo/doc/mo.doxyfile.cmake @@ -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. diff --git a/trunk/paradiseo-mo/src/continuator/moStat.h b/trunk/paradiseo-mo/src/continuator/moStat.h index 809383a96..bfbd4e620 100644 --- a/trunk/paradiseo-mo/src/continuator/moStat.h +++ b/trunk/paradiseo-mo/src/continuator/moStat.h @@ -55,12 +55,6 @@ public: moStat(T _value, std::string _description): eoValueParam(_value, _description) {} -// /** -// * @return name of the class -// */ -// virtual std::string className(void) const { -// return "moStat"; -// } }; diff --git a/trunk/paradiseo-mo/src/continuator/moStatFromStat.h b/trunk/paradiseo-mo/src/continuator/moStatFromStat.h index 162129cbb..a8c934e0b 100644 --- a/trunk/paradiseo-mo/src/continuator/moStatFromStat.h +++ b/trunk/paradiseo-mo/src/continuator/moStatFromStat.h @@ -48,6 +48,7 @@ public : /** * Default Constructor + * @param _stat a stat */ moStatFromStat(moStat & _stat): moStat(0, _stat.description()), stat(_stat) { } diff --git a/trunk/paradiseo-mo/src/continuator/moTimeContinuator.h b/trunk/paradiseo-mo/src/continuator/moTimeContinuator.h index 8add92ffa..94d13721d 100644 --- a/trunk/paradiseo-mo/src/continuator/moTimeContinuator.h +++ b/trunk/paradiseo-mo/src/continuator/moTimeContinuator.h @@ -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); diff --git a/trunk/paradiseo-mo/src/continuator/moTrueContinuator.h b/trunk/paradiseo-mo/src/continuator/moTrueContinuator.h index a4243ba44..88feb91a3 100644 --- a/trunk/paradiseo-mo/src/continuator/moTrueContinuator.h +++ b/trunk/paradiseo-mo/src/continuator/moTrueContinuator.h @@ -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; diff --git a/trunk/paradiseo-mo/src/continuator/moVectorMonitor.h b/trunk/paradiseo-mo/src/continuator/moVectorMonitor.h index ad45909a6..5fc74db9a 100644 --- a/trunk/paradiseo-mo/src/continuator/moVectorMonitor.h +++ b/trunk/paradiseo-mo/src/continuator/moVectorMonitor.h @@ -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 moVectorMonitor(eoValueParam > & _param) : doubleParam( & (eoValueParam&)_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 moVectorMonitor(eoValueParam & _param) : doubleParam(NULL), intParam(NULL), eotParam(NULL) diff --git a/trunk/paradiseo-mo/src/coolingSchedule/moSimpleCoolingSchedule.h b/trunk/paradiseo-mo/src/coolingSchedule/moSimpleCoolingSchedule.h index 09cd13e45..3c04c1084 100644 --- a/trunk/paradiseo-mo/src/coolingSchedule/moSimpleCoolingSchedule.h +++ b/trunk/paradiseo-mo/src/coolingSchedule/moSimpleCoolingSchedule.h @@ -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 diff --git a/trunk/paradiseo-mo/src/eval/moDummyEval.h b/trunk/paradiseo-mo/src/eval/moDummyEval.h index 2fa9dfdb5..67861990c 100644 --- a/trunk/paradiseo-mo/src/eval/moDummyEval.h +++ b/trunk/paradiseo-mo/src/eval/moDummyEval.h @@ -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){} diff --git a/trunk/paradiseo-mo/src/explorer/moDummyExplorer.h b/trunk/paradiseo-mo/src/explorer/moDummyExplorer.h index 5e6b6eca7..c9a1e655d 100644 --- a/trunk/paradiseo-mo/src/explorer/moDummyExplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moDummyExplorer.h @@ -51,46 +51,46 @@ public: moDummyExplorer(): moNeighborhoodExplorer() { } /** - * 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) { } diff --git a/trunk/paradiseo-mo/src/explorer/moFirstImprHCexplorer.h b/trunk/paradiseo-mo/src/explorer/moFirstImprHCexplorer.h index 6707b393e..455afcc91 100644 --- a/trunk/paradiseo-mo/src/explorer/moFirstImprHCexplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moFirstImprHCexplorer.h @@ -41,7 +41,7 @@ #include /** - * Explorer for a first imporvement heuristic + * Explorer for a first improvement heuristic */ template< class Neighbor> class moFirstImprHCexplorer : public moNeighborhoodExplorer @@ -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 */ diff --git a/trunk/paradiseo-mo/src/explorer/moILSexplorer.h b/trunk/paradiseo-mo/src/explorer/moILSexplorer.h index 9869a643c..520905a1f 100644 --- a/trunk/paradiseo-mo/src/explorer/moILSexplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moILSexplorer.h @@ -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; diff --git a/trunk/paradiseo-mo/src/explorer/moNeighborhoodExplorer.h b/trunk/paradiseo-mo/src/explorer/moNeighborhoodExplorer.h index e2701ddd1..6500db50f 100644 --- a/trunk/paradiseo-mo/src/explorer/moNeighborhoodExplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moNeighborhoodExplorer.h @@ -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 dummyNeighborhood; moDummyEval dummyEval; diff --git a/trunk/paradiseo-mo/src/explorer/moNeutralHCexplorer.h b/trunk/paradiseo-mo/src/explorer/moNeutralHCexplorer.h index fb8ee7ddb..6ecd91b88 100644 --- a/trunk/paradiseo-mo/src/explorer/moNeutralHCexplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moNeutralHCexplorer.h @@ -70,8 +70,7 @@ public: moNeighborComparator& _neighborComparator, moSolNeighborComparator& _solNeighborComparator, unsigned _nbStep) : - moRandomBestHCexplorer(_neighborhood, _eval, _neighborComparator, _solNeighborComparator), - nbStep(_nbStep) { + moRandomBestHCexplorer(_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::initParam(solution); + virtual void initParam(EOT & _solution) { + moRandomBestHCexplorer::initParam(_solution); step = 0; }; /** * one more step + * @param _solution the current solution */ - virtual void updateParam(EOT & solution) { - moRandomBestHCexplorer::updateParam(solution); + virtual void updateParam(EOT & _solution) { + moRandomBestHCexplorer::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 */ diff --git a/trunk/paradiseo-mo/src/explorer/moRandomBestHCexplorer.h b/trunk/paradiseo-mo/src/explorer/moRandomBestHCexplorer.h index 476bf6a07..6dd6299ea 100644 --- a/trunk/paradiseo-mo/src/explorer/moRandomBestHCexplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moRandomBestHCexplorer.h @@ -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) { diff --git a/trunk/paradiseo-mo/src/explorer/moRandomNeutralWalkExplorer.h b/trunk/paradiseo-mo/src/explorer/moRandomNeutralWalkExplorer.h index 9d2579187..410c5b1f8 100644 --- a/trunk/paradiseo-mo/src/explorer/moRandomNeutralWalkExplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moRandomNeutralWalkExplorer.h @@ -62,7 +62,8 @@ public: * @param _solNeighborComparator a solution vs neighbor comparator * @param _nbStep maximum number of step to do */ - moRandomNeutralWalkExplorer(Neighborhood& _neighborhood, moEval& _eval, + moRandomNeutralWalkExplorer(Neighborhood& _neighborhood, + moEval& _eval, moSolNeighborComparator& _solNeighborComparator, unsigned _nbStep): moNeighborhoodExplorer(_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 */ diff --git a/trunk/paradiseo-mo/src/explorer/moRandomSearchExplorer.h b/trunk/paradiseo-mo/src/explorer/moRandomSearchExplorer.h index a4d4eccac..8520803e4 100644 --- a/trunk/paradiseo-mo/src/explorer/moRandomSearchExplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moRandomSearchExplorer.h @@ -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& _init, eoEvalFunc& _fulleval, unsigned _nbStep) : moNeighborhoodExplorer(), 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 diff --git a/trunk/paradiseo-mo/src/explorer/moRandomWalkExplorer.h b/trunk/paradiseo-mo/src/explorer/moRandomWalkExplorer.h index f008751d0..4c74fa25a 100644 --- a/trunk/paradiseo-mo/src/explorer/moRandomWalkExplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moRandomWalkExplorer.h @@ -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) { diff --git a/trunk/paradiseo-mo/src/explorer/moSAexplorer.h b/trunk/paradiseo-mo/src/explorer/moSAexplorer.h index ca1b17735..479be2355 100644 --- a/trunk/paradiseo-mo/src/explorer/moSAexplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moSAexplorer.h @@ -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& _eval, moSolNeighborComparator& _solNeighborComparator, moCoolingSchedule& _coolingSchedule) : moNeighborhoodExplorer(_neighborhood, _eval), solNeighborComparator(_solNeighborComparator), coolingSchedule(_coolingSchedule) { isAccept = false; @@ -168,6 +167,10 @@ public: return isAccept; }; + /** + * Getter + * @return the temperature + */ double getTemperature(){ return temperature; } diff --git a/trunk/paradiseo-mo/src/memory/moAspiration.h b/trunk/paradiseo-mo/src/memory/moAspiration.h index 26c5a77e2..7a9e338e0 100644 --- a/trunk/paradiseo-mo/src/memory/moAspiration.h +++ b/trunk/paradiseo-mo/src/memory/moAspiration.h @@ -1,3 +1,33 @@ +/* + +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 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; }; diff --git a/trunk/paradiseo-mo/src/memory/moBestImprAspiration.h b/trunk/paradiseo-mo/src/memory/moBestImprAspiration.h index 4fe5fb9d0..7187ef666 100644 --- a/trunk/paradiseo-mo/src/memory/moBestImprAspiration.h +++ b/trunk/paradiseo-mo/src/memory/moBestImprAspiration.h @@ -1,3 +1,33 @@ +/* + +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 diff --git a/trunk/paradiseo-mo/src/memory/moCountMoveMemory.h b/trunk/paradiseo-mo/src/memory/moCountMoveMemory.h index 90e7bb871..a5417e1ed 100644 --- a/trunk/paradiseo-mo/src/memory/moCountMoveMemory.h +++ b/trunk/paradiseo-mo/src/memory/moCountMoveMemory.h @@ -52,7 +52,7 @@ public: } /** - * @param _sol unused solution + * @param _sol a solution (unused) * @param _neighbor unused neighbor */ void add(EOT & _sol, Neighbor & _neighbor) { diff --git a/trunk/paradiseo-mo/src/memory/moDiversification.h b/trunk/paradiseo-mo/src/memory/moDiversification.h index dee5c068e..af0292f82 100644 --- a/trunk/paradiseo-mo/src/memory/moDiversification.h +++ b/trunk/paradiseo-mo/src/memory/moDiversification.h @@ -1,3 +1,32 @@ +/* + +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 _moDiversification_h #define _moDiversification_h @@ -8,7 +37,6 @@ * Abstract class for diversification strategy */ template< class Neighbor > -class moDiversification : virtual public moMemory, public eoUF - {}; +class moDiversification : virtual public moMemory, public eoUF{}; #endif diff --git a/trunk/paradiseo-mo/src/memory/moDummyDiversification.h b/trunk/paradiseo-mo/src/memory/moDummyDiversification.h index c7fb32bbf..72cd1f686 100644 --- a/trunk/paradiseo-mo/src/memory/moDummyDiversification.h +++ b/trunk/paradiseo-mo/src/memory/moDummyDiversification.h @@ -1,3 +1,32 @@ +/* + +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 _moDummyDiversification_h #define _moDummyDiversification_h diff --git a/trunk/paradiseo-mo/src/memory/moDummyIntensification.h b/trunk/paradiseo-mo/src/memory/moDummyIntensification.h index 85a1311f1..d6fd9ef3d 100644 --- a/trunk/paradiseo-mo/src/memory/moDummyIntensification.h +++ b/trunk/paradiseo-mo/src/memory/moDummyIntensification.h @@ -1,3 +1,32 @@ +/* + +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 _moDummyIntensification_h #define _moDummyIntensification_h diff --git a/trunk/paradiseo-mo/src/memory/moIntensification.h b/trunk/paradiseo-mo/src/memory/moIntensification.h index ca69d066b..f5257e284 100644 --- a/trunk/paradiseo-mo/src/memory/moIntensification.h +++ b/trunk/paradiseo-mo/src/memory/moIntensification.h @@ -1,3 +1,32 @@ +/* + +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 _moIntensification_h #define _moIntensification_h @@ -8,7 +37,6 @@ * Abstract class for intensification strategy */ template< class Neighbor > -class moIntensification : virtual public moMemory, public eoUF - {}; +class moIntensification : virtual public moMemory, public eoUF{}; #endif diff --git a/trunk/paradiseo-mo/src/memory/moSolVectorTabuList.h b/trunk/paradiseo-mo/src/memory/moSolVectorTabuList.h index 66293f29c..080d35c5e 100644 --- a/trunk/paradiseo-mo/src/memory/moSolVectorTabuList.h +++ b/trunk/paradiseo-mo/src/memory/moSolVectorTabuList.h @@ -1,3 +1,32 @@ +/* + +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 _moSolVectorTabuList_h #define _moSolVectorTabuList_h diff --git a/trunk/paradiseo-mo/src/memory/moTabuList.h b/trunk/paradiseo-mo/src/memory/moTabuList.h index e6dc409bd..018996e8a 100644 --- a/trunk/paradiseo-mo/src/memory/moTabuList.h +++ b/trunk/paradiseo-mo/src/memory/moTabuList.h @@ -1,3 +1,32 @@ +/* + +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 _moTabuList_h #define _moTabuList_h diff --git a/trunk/paradiseo-mo/src/mo.h b/trunk/paradiseo-mo/src/mo.h index 1a0d9deeb..b81d5750a 100755 --- a/trunk/paradiseo-mo/src/mo.h +++ b/trunk/paradiseo-mo/src/mo.h @@ -35,90 +35,98 @@ #ifndef _newmo_h #define _newmo_h -#include +#include +#include +#include + #include -#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include #include -#include #include #include -#include #include +#include +#include +#include #include +#include #include #include +#include #include +#include #include -#include -#include +#include +#include #include #include +#include #include #include +#include +#include +#include #include #include #include -#include -#include #include -#include -#include #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include #include +#include #include +#include +#include + +#include #include +#include #include #include -#include -#include -#include +#include #include -#include +#include #include #include -#include -#include -#include -#include -#include +#include #include -#include -#include +#include +#include +#include #include +#include +#include #include #include +#include #include -#include #include #include +#include #include #include -#include -#include -#include -#include #include +#include +#include +#include #include #include @@ -132,45 +140,31 @@ #include #include -#include -#include -#include -#include #include +#include +#include +#include +#include #include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include #include #include #include #include -//#include -//#include -//#include -//#include -//#include -//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif diff --git a/trunk/paradiseo-mo/src/neighborhood/moDummyNeighborhood.h b/trunk/paradiseo-mo/src/neighborhood/moDummyNeighborhood.h index 4c8bfddcf..824f8e7ea 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moDummyNeighborhood.h +++ b/trunk/paradiseo-mo/src/neighborhood/moDummyNeighborhood.h @@ -43,7 +43,7 @@ public: /** * NOTHING TO DO - * @param _solution the related solution + * @param _solution a solution (unused) * @return always false */ virtual bool hasNeighbor(EOT & _solution){ @@ -52,21 +52,21 @@ public: /** * NOTHING TO DO - * @param _solution the solution to explore - * @param _current the first neighbor + * @param _solution a solution (unused) + * @param _current a neighbor (unused) */ virtual void init(EOT & _solution, Neighbor & _current){} /** * NOTHING TO DO - * @param _solution the solution to explore - * @param _current the next neighbor + * @param _solution a solution (unused) + * @param _current a neighbor (unused) */ virtual void next(EOT & _solution, Neighbor & _current){} /** * NOTHING TO DO - * @param _solution the solution to explore + * @param _solution a solution (unused) * @return always false */ virtual bool cont(EOT & _solution){ diff --git a/trunk/paradiseo-mo/src/neighborhood/moIndexNeighbor.h b/trunk/paradiseo-mo/src/neighborhood/moIndexNeighbor.h index 795a2e0bd..7957f2112 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moIndexNeighbor.h +++ b/trunk/paradiseo-mo/src/neighborhood/moIndexNeighbor.h @@ -54,6 +54,7 @@ public: /** * Copy Constructor + * @param _n the neighbor to copy */ moIndexNeighbor(const moIndexNeighbor& _n) : moNeighbor(_n) { this->key = _n.key ; @@ -61,6 +62,7 @@ public: /** * Assignment operator + * @param _source the source neighbor */ virtual moIndexNeighbor & operator=(const moIndexNeighbor & _source) { moNeighbor::operator=(_source); diff --git a/trunk/paradiseo-mo/src/neighborhood/moIndexNeighborhood.h b/trunk/paradiseo-mo/src/neighborhood/moIndexNeighborhood.h index 8d0c0f379..e4452c3f2 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moIndexNeighborhood.h +++ b/trunk/paradiseo-mo/src/neighborhood/moIndexNeighborhood.h @@ -55,15 +55,8 @@ public: */ moIndexNeighborhood(unsigned int _neighborhoodSize):neighborhoodSize(_neighborhoodSize) {} - /** - * Return the class id. - * @return the class name as a std::string - */ -// virtual std::string className() const { -// return "moIndexNeighborhood"; -// } - protected: + // size of the neighborhood unsigned int neighborhoodSize; }; diff --git a/trunk/paradiseo-mo/src/neighborhood/moNeighborhood.h b/trunk/paradiseo-mo/src/neighborhood/moNeighborhood.h index 2dd880aaa..ea0c6afcb 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moNeighborhood.h +++ b/trunk/paradiseo-mo/src/neighborhood/moNeighborhood.h @@ -55,7 +55,7 @@ public: moNeighborhood() {} /** - * @return if the neighborhood is random + * @return if the neighborhood is random (default false) */ virtual bool isRandom() { return false; diff --git a/trunk/paradiseo-mo/src/neighborhood/moRndNeighborhood.h b/trunk/paradiseo-mo/src/neighborhood/moRndNeighborhood.h index 8a80adb4a..52ad20d4c 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moRndNeighborhood.h +++ b/trunk/paradiseo-mo/src/neighborhood/moRndNeighborhood.h @@ -32,11 +32,17 @@ Contact: paradiseo-help@lists.gforge.inria.fr #include +/** + * Class used to specify a neighborhood is random + */ template< class Neighbor > class moRndNeighborhood : virtual public moNeighborhood { public: + /** + * @return true + */ bool isRandom() { return true; } diff --git a/trunk/paradiseo-mo/src/old/moIncrEvalWrapper.h b/trunk/paradiseo-mo/src/old/moIncrEvalWrapper.h deleted file mode 100644 index 5d4b2b86b..000000000 --- a/trunk/paradiseo-mo/src/old/moIncrEvalWrapper.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef moIncrEvalWrapper_H -#define moIncrEvalWrapper_H - -#include -#include - -/* - * (Old fashioned) Incremental evaluation to use with a moMoveNeighbor - * WARNING: Don't use this class unless you are an moMove user. - */ -template -class moIncrEvalWrapper : public moEval -{ -public: - using moEval::EOT EOT; - using moEval::Fitness Fitness; - - moIncrEvalWrapper(moIncrEval& _incr):incr(_incr) {} - - /* - * make the evaluation of the current neighbor and update the information on this neighbor - * the evaluation could be incremental - */ - virtual void eval(MoveNeighbor& _neighbor,EOT & _solution) { - _neighbor.fitness(incrEval(*(_neighbor.getMove()), _solution)); - } - -private: - /** the full evaluation object */ - moIncrEval & incrEval; - -}; - -#endif diff --git a/trunk/paradiseo-mo/src/old/moMove.h b/trunk/paradiseo-mo/src/old/moMove.h deleted file mode 100644 index 2c56aa21a..000000000 --- a/trunk/paradiseo-mo/src/old/moMove.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - 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". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - 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 _moMove_h -#define _moMove_h - -#include - -// Definition of a move. - -/* - * A move transforms a solution to another close solution. - * It describes how a solution can be modified to another one. - */ -template < class EOT > -class moMove:public eoUF < EOT &, void > -{ -public: - - // Alias for the type - typedef EOT EOType; -}; - -#endif diff --git a/trunk/paradiseo-mo/src/old/moMoveIncrEval.h b/trunk/paradiseo-mo/src/old/moMoveIncrEval.h deleted file mode 100644 index d28fa8e06..000000000 --- a/trunk/paradiseo-mo/src/old/moMoveIncrEval.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - 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". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - 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 _moMoveIncrEval_h -#define _moMoveIncrEval_h - -#include - -// (generally) Efficient evaluation function based a move and a solution. - -/* - * From a move and a solution, it computes - * a new fitness that could be associated to - * the solution if this one is updated. - */ -template < class M, class Objective = typename M::EOType::Fitness> -class moMoveIncrEval:public eoBF < const M &, const typename M::EOType &, Objective > - {}; - -#endif diff --git a/trunk/paradiseo-mo/src/old/moMoveInit.h b/trunk/paradiseo-mo/src/old/moMoveInit.h deleted file mode 100644 index 8b59424af..000000000 --- a/trunk/paradiseo-mo/src/old/moMoveInit.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - 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". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - 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 _moMoveInit_h -#define _moMoveInit_h - -#include - -// Move (moMove) initializer -/* - * Class which allows to initiase a move. - * Only a description... An object that herits from this class needs to be designed to be used. - */ -template < class M > -class moMoveInit:public eoBF < M &, const typename M::EOType &, void > - {}; - -#endif diff --git a/trunk/paradiseo-mo/src/old/moMoveNeighbor.h b/trunk/paradiseo-mo/src/old/moMoveNeighbor.h deleted file mode 100644 index 7550be693..000000000 --- a/trunk/paradiseo-mo/src/old/moMoveNeighbor.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _moMoveNeighbor_h -#define _moMoveNeighbor_h - -#include - -#include -#include -#include - - -/* - contener of the neighbor informations -*/ -template< class M , class Fitness > -class moMoveNeighbor : public moNeighbor -{ -public: - - typedef typename M::EOType EOT; - - // empty constructor - moMoveNeighbor() { - move=new M(); - }; - - ~moMoveNeighbor() { - delete move; - }; - - // copy constructeur - moMoveNeighbor(const moMoveNeighbor & _n) { - moNeighbor::operator=(_n); - (*move) = *(_n.getMove()); - } - - // assignment operator - virtual moMoveNeighbor & operator=(const moMoveNeighbor & _n) { - moNeighbor ::operator=(_n); - (*move) = *(_n.getMove()); - return *this ; - } - - /* - * move the solution - */ - virtual void move(EOT & _solution) { - (*move)(_solution); - } - - /** Return the class id. - * @return the class name as a std::string - */ - virtual std::string className() const { - return "moMoveNeighbor"; - } - - void setMove(M* _move) { - move=_move; - } - - M* getMove() { - return move; - } - - -private: - M* move; - -}; - -#endif diff --git a/trunk/paradiseo-mo/src/old/moMoveNeighborhood.h b/trunk/paradiseo-mo/src/old/moMoveNeighborhood.h deleted file mode 100644 index aede5fc44..000000000 --- a/trunk/paradiseo-mo/src/old/moMoveNeighborhood.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef _moMoveNeighborhood_h -#define _moMoveNeighborhood_h - -#include -#include - -#include -#include - -template< class M, class Fitness > -class moMoveNeighborhood : public moNeighborhood > -{ -public: - - typedef moMoveNeighbor Neighbor; - typedef typename M::EOType EOT; - - moMoveNeighborhood(moMoveInit& i, moNextMove& n):_init(i), _next(n), isContinue(true) {} - - virtual bool hasNeighbor(EOT & solution) { - return true; - } - - /* - initialisation of the neighborhood - */ - virtual void init(EOT & solution, Neighbor & current) { - _init(*(current._move), solution); - isContinue=true; - } - - /* - Give the next neighbor - */ - virtual void next(EOT & solution, Neighbor & current) { - isContinue=_next(*(current._move), solution); - } - - /* - if false, there is no neighbor left to explore - */ - virtual bool cont(EOT & solution) { - return isContinue; - } - - /** Return the class id. - * @return the class name as a std::string - */ - virtual std::string className() const { - return "moMoveNeighborhood"; - } - -private: - moMoveInit& _init; - moNextMove& _next; - bool isContinue; - -}; - - -#endif diff --git a/trunk/paradiseo-mo/src/old/moNextMove.h b/trunk/paradiseo-mo/src/old/moNextMove.h deleted file mode 100644 index 10fda225d..000000000 --- a/trunk/paradiseo-mo/src/old/moNextMove.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 - (C) OPAC Team, LIFL, 2002-2008 - - Sébastien Cahon, Jean-Charles Boisson (Jean-Charles.Boisson@lifl.fr) - - This software is governed by the CeCILL license under French law and - abiding by the rules of distribution of free software. You can use, - 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". - - As a counterpart to the access to the source code and rights to copy, - modify and redistribute granted by the license, users are provided only - with a limited warranty and the software's author, the holder of the - economic rights, and the successive licensors have only limited liability. - - 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 _moNextMove_h -#define _moNextMove_h - -#include - -// Class which allows to generate a new move (moMove). -/* - * Useful for the explorer (for moTS or moHC). - * Does nothing... An object that herits from this class needs to be designed for being used. - */ -template < class M > -class moNextMove:public eoBF < M &, const typename M::EOType &, bool > - {}; - -#endif diff --git a/trunk/paradiseo-mo/src/perturb/moPerturbation.h b/trunk/paradiseo-mo/src/perturb/moPerturbation.h index 7802e342e..46fb9b0b9 100644 --- a/trunk/paradiseo-mo/src/perturb/moPerturbation.h +++ b/trunk/paradiseo-mo/src/perturb/moPerturbation.h @@ -37,7 +37,6 @@ Contact: paradiseo-help@lists.gforge.inria.fr * Abstract class for Perturbation operator */ template< class Neighbor > -class moPerturbation : public eoMonOp, virtual public moMemory { -}; +class moPerturbation : public eoMonOp, virtual public moMemory {}; #endif diff --git a/trunk/paradiseo-mo/src/perturb/moRestartPerturb.h b/trunk/paradiseo-mo/src/perturb/moRestartPerturb.h index 015685159..5ab71e1f1 100644 --- a/trunk/paradiseo-mo/src/perturb/moRestartPerturb.h +++ b/trunk/paradiseo-mo/src/perturb/moRestartPerturb.h @@ -47,7 +47,7 @@ public: /** * Default Constructor - * @param _init an initializer of solution + * @param _initializer an initializer of solution * @param _fullEval a full evaluation function * @param _threshold maximum number of iteration with no improvement */ diff --git a/trunk/paradiseo-mo/src/perturb/moSolInit.h b/trunk/paradiseo-mo/src/perturb/moSolInit.h index 56af5c996..8348adcb0 100644 --- a/trunk/paradiseo-mo/src/perturb/moSolInit.h +++ b/trunk/paradiseo-mo/src/perturb/moSolInit.h @@ -38,12 +38,12 @@ Contact: paradiseo-help@lists.gforge.inria.fr template< class EOT > class moSolInit : public eoInit { public: + /** * Default Constructor * @param _extSol external solution of the intiialization */ - moSolInit(EOT & _extSol) : extSol(_extSol) { - } + moSolInit(EOT & _extSol) : extSol(_extSol) {} /** * Initialization on the externatl solution diff --git a/trunk/paradiseo-mo/src/problems/eval/moOneMaxIncrEval.h b/trunk/paradiseo-mo/src/problems/eval/moOneMaxIncrEval.h index 56edaf2d6..ede6fa91e 100644 --- a/trunk/paradiseo-mo/src/problems/eval/moOneMaxIncrEval.h +++ b/trunk/paradiseo-mo/src/problems/eval/moOneMaxIncrEval.h @@ -47,10 +47,10 @@ public: * @param _neighbor the neighbor to consider (of type moBitNeigbor) */ virtual void operator()(EOT & _solution, Neighbor & _neighbor) { - if (_solution[_neighbor.index()] == 0) - _neighbor.fitness(_solution.fitness() + 1); - else - _neighbor.fitness(_solution.fitness() - 1); + if (_solution[_neighbor.index()] == 0) + _neighbor.fitness(_solution.fitness() + 1); + else + _neighbor.fitness(_solution.fitness() - 1); } }; diff --git a/trunk/paradiseo-mo/src/sampling/moFDCsampling.h b/trunk/paradiseo-mo/src/sampling/moFDCsampling.h index 3d8342fca..57e9492a0 100644 --- a/trunk/paradiseo-mo/src/sampling/moFDCsampling.h +++ b/trunk/paradiseo-mo/src/sampling/moFDCsampling.h @@ -62,7 +62,7 @@ public: /** * Default Constructor * @param _init initialisation method of the solution - * @param _neighborhood neighborhood giving neighbor in random order + * @param _fullEval a full evaluation function * @param _dist the distance function between solution * @param _refSol the reference solution to compute the distance (think of global optimum when possible) * @param _nbSol Number of solutions of the sample diff --git a/trunk/paradiseo-mo/src/sampling/moHillClimberSampling.h b/trunk/paradiseo-mo/src/sampling/moHillClimberSampling.h index 6be444755..1b83f2017 100644 --- a/trunk/paradiseo-mo/src/sampling/moHillClimberSampling.h +++ b/trunk/paradiseo-mo/src/sampling/moHillClimberSampling.h @@ -66,6 +66,8 @@ public: * Default Constructor * @param _init initialisation method of the solution * @param _neighborhood neighborhood giving neighbor in random order + * @param _fullEval a full evaluation function + * @param _eval an incremental evaluation of neighbors * @param _nbAdaptWalk Number of adaptive walks */ moHillClimberSampling(eoInit & _init,