diff --git a/trunk/paradiseo-mo/src/explorer/moHCneutralExplorer.h b/trunk/paradiseo-mo/src/explorer/moHCneutralExplorer.h index f1e65fde9..f29654be9 100644 --- a/trunk/paradiseo-mo/src/explorer/moHCneutralExplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moHCneutralExplorer.h @@ -35,7 +35,7 @@ #ifndef _moHCneutralExplorer_h #define _moHCneutralExplorer_h -#include +#include #include #include #include @@ -44,18 +44,18 @@ * Explorer for a neutral Hill-climbing */ template< class Neighbor > -class moHCneutralExplorer : public moSimpleHCneutralExplorer +class moHCneutralExplorer : public moRandomBestHCExplorer { public: typedef typename Neighbor::EOT EOT ; typedef moNeighborhood Neighborhood ; using moNeighborhoodExplorer::neighborhood; - using moSimpleHCneutralExplorer::solNeighborComparator; - using moSimpleHCneutralExplorer::isAccept; - using moSimpleHCneutralExplorer::bestVector; - using moSimpleHCneutralExplorer::initParam; - using moSimpleHCneutralExplorer::updateParam; + using moRandomBestHCExplorer::solNeighborComparator; + using moRandomBestHCExplorer::isAccept; + using moRandomBestHCExplorer::bestVector; + using moRandomBestHCExplorer::initParam; + using moRandomBestHCExplorer::updateParam; /** * Constructor @@ -70,7 +70,7 @@ public: moNeighborComparator& _neighborComparator, moSolNeighborComparator& _solNeighborComparator, unsigned _nbStep) : - moSimpleHCneutralExplorer(_neighborhood, _eval, _neighborComparator, _solNeighborComparator), + moRandomBestHCExplorer(_neighborhood, _eval, _neighborComparator, _solNeighborComparator), nbStep(_nbStep) { //Some cycle is possible with equals fitness solutions if the neighborhood is not random if (!neighborhood.isRandom()) { @@ -88,7 +88,7 @@ public: * initial number of step */ virtual void initParam(EOT & solution) { - moSimpleHCneutralExplorer::initParam(solution); + moRandomBestHCExplorer::initParam(solution); step = 0; }; @@ -97,7 +97,7 @@ public: * one more step */ virtual void updateParam(EOT & solution) { - moSimpleHCneutralExplorer::updateParam(solution); + moRandomBestHCExplorer::updateParam(solution); step++; }; diff --git a/trunk/paradiseo-mo/src/explorer/moILSexplorer.h b/trunk/paradiseo-mo/src/explorer/moILSexplorer.h index 5fbd81ddb..9869a643c 100644 --- a/trunk/paradiseo-mo/src/explorer/moILSexplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moILSexplorer.h @@ -48,12 +48,12 @@ * Explorer for an Iterated Local Search */ template< class Neighbor > -class moILSexplorer : public moNeighborhoodExplorer< moDummyNeighbor > +class moILSexplorer : public moNeighborhoodExplorer< moDummyNeighbor > { public: typedef moNeighborhood Neighborhood ; typedef typename Neighbor::EOT EOT; - typedef moDummyNeighbor dummyNeighbor; + typedef moDummyNeighbor dummyNeighbor; typedef moDummyNeighborhood dummyNeighborhood; /** diff --git a/trunk/paradiseo-mo/src/explorer/moSimpleHCneutralExplorer.h b/trunk/paradiseo-mo/src/explorer/moRandomBestHCExplorer.h similarity index 95% rename from trunk/paradiseo-mo/src/explorer/moSimpleHCneutralExplorer.h rename to trunk/paradiseo-mo/src/explorer/moRandomBestHCExplorer.h index cf9e7b1ca..d393debf5 100644 --- a/trunk/paradiseo-mo/src/explorer/moSimpleHCneutralExplorer.h +++ b/trunk/paradiseo-mo/src/explorer/moRandomBestHCExplorer.h @@ -1,5 +1,5 @@ /* - + Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau @@ -32,8 +32,8 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ -#ifndef _moSimpleHCneutralExplorer_h -#define _moSimpleHCneutralExplorer_h +#ifndef _moRandomBestHCExplorer_h +#define _moRandomBestHCExplorer_h #include #include @@ -46,7 +46,7 @@ * Explorer for a simple neutral Hill-climbing */ template< class Neighbor > -class moSimpleHCneutralExplorer : public moNeighborhoodExplorer +class moRandomBestHCExplorer : public moNeighborhoodExplorer { public: typedef typename Neighbor::EOT EOT ; @@ -62,7 +62,7 @@ public: * @param _neighborComparator a neighbor comparator * @param _solNeighborComparator solution vs neighbor comparator */ - moSimpleHCneutralExplorer(Neighborhood& _neighborhood, + moRandomBestHCExplorer(Neighborhood& _neighborhood, moEval& _eval, moNeighborComparator& _neighborComparator, moSolNeighborComparator& _solNeighborComparator) : @@ -76,7 +76,7 @@ public: /** * Destructor */ - ~moSimpleHCneutralExplorer() { + ~moRandomBestHCExplorer() { delete current; } diff --git a/trunk/paradiseo-mo/src/mo.h b/trunk/paradiseo-mo/src/mo.h index 3e394fbee..4de7cf18c 100755 --- a/trunk/paradiseo-mo/src/mo.h +++ b/trunk/paradiseo-mo/src/mo.h @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include #include @@ -90,7 +90,6 @@ #include #include -#include #include #include #include @@ -112,6 +111,8 @@ #include #include +#include + //#include //#include //#include diff --git a/trunk/paradiseo-mo/src/neighborhood/moBitNeighbor.h b/trunk/paradiseo-mo/src/problems/bitString/moBitNeighbor.h similarity index 100% rename from trunk/paradiseo-mo/src/neighborhood/moBitNeighbor.h rename to trunk/paradiseo-mo/src/problems/bitString/moBitNeighbor.h diff --git a/trunk/paradiseo-mo/test/moTestClass.h b/trunk/paradiseo-mo/test/moTestClass.h index 2b58e60c6..873bb2bc2 100644 --- a/trunk/paradiseo-mo/test/moTestClass.h +++ b/trunk/paradiseo-mo/test/moTestClass.h @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/paradiseo-mo/test/t-moBitNeighbor.cpp b/trunk/paradiseo-mo/test/t-moBitNeighbor.cpp index a5f3d3689..71ac6bca7 100644 --- a/trunk/paradiseo-mo/test/t-moBitNeighbor.cpp +++ b/trunk/paradiseo-mo/test/t-moBitNeighbor.cpp @@ -32,7 +32,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ -#include +#include #include #include diff --git a/trunk/paradiseo-mo/test/t-moDistanceStat.cpp b/trunk/paradiseo-mo/test/t-moDistanceStat.cpp index 5fd98b550..c14971756 100644 --- a/trunk/paradiseo-mo/test/t-moDistanceStat.cpp +++ b/trunk/paradiseo-mo/test/t-moDistanceStat.cpp @@ -27,7 +27,7 @@ ParadisEO WebSite : http://paradiseo.gforge.inria.fr Contact: paradiseo-help@lists.gforge.inria.fr */ -#include +#include #include #include diff --git a/trunk/paradiseo-mo/test/t-moFitnessStat.cpp b/trunk/paradiseo-mo/test/t-moFitnessStat.cpp index dc0c47102..f243d1e19 100644 --- a/trunk/paradiseo-mo/test/t-moFitnessStat.cpp +++ b/trunk/paradiseo-mo/test/t-moFitnessStat.cpp @@ -28,7 +28,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ #include -#include +#include #include #include diff --git a/trunk/paradiseo-mo/test/t-moNeighborComparator.cpp b/trunk/paradiseo-mo/test/t-moNeighborComparator.cpp index 681d13e25..cbdb3e4df 100644 --- a/trunk/paradiseo-mo/test/t-moNeighborComparator.cpp +++ b/trunk/paradiseo-mo/test/t-moNeighborComparator.cpp @@ -32,7 +32,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ -#include +#include #include #include #include diff --git a/trunk/paradiseo-mo/test/t-moOrderNeighborhood.cpp b/trunk/paradiseo-mo/test/t-moOrderNeighborhood.cpp index 43f948a04..a95a5238d 100644 --- a/trunk/paradiseo-mo/test/t-moOrderNeighborhood.cpp +++ b/trunk/paradiseo-mo/test/t-moOrderNeighborhood.cpp @@ -33,7 +33,7 @@ */ #include -#include +#include #include #include diff --git a/trunk/paradiseo-mo/test/t-moRndWithReplNeighborhood.cpp b/trunk/paradiseo-mo/test/t-moRndWithReplNeighborhood.cpp index 4e8d0b874..d93f9bcdc 100644 --- a/trunk/paradiseo-mo/test/t-moRndWithReplNeighborhood.cpp +++ b/trunk/paradiseo-mo/test/t-moRndWithReplNeighborhood.cpp @@ -28,7 +28,6 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ #include -#include #include "moTestClass.h" #include diff --git a/trunk/paradiseo-mo/test/t-moRndWithoutReplNeighborhood.cpp b/trunk/paradiseo-mo/test/t-moRndWithoutReplNeighborhood.cpp index cce451053..50f8afbe0 100644 --- a/trunk/paradiseo-mo/test/t-moRndWithoutReplNeighborhood.cpp +++ b/trunk/paradiseo-mo/test/t-moRndWithoutReplNeighborhood.cpp @@ -28,7 +28,6 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ #include -#include #include "moTestClass.h" #include diff --git a/trunk/paradiseo-mo/test/t-moSimpleHCneutralExplorer.cpp b/trunk/paradiseo-mo/test/t-moSimpleHCneutralExplorer.cpp index 80b4f91a3..74f8c8bcf 100644 --- a/trunk/paradiseo-mo/test/t-moSimpleHCneutralExplorer.cpp +++ b/trunk/paradiseo-mo/test/t-moSimpleHCneutralExplorer.cpp @@ -1,5 +1,5 @@ /* - + Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010 Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau @@ -29,7 +29,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr #include #include -#include +#include #include "moTestClass.h" #include @@ -38,7 +38,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr int main() { - std::cout << "[t-moSimpleHCneutralExplorer] => START" << std::endl; + std::cout << "[t-moRandomBestHCExplorer] => START" << std::endl; //instanciation eoBit sol(4, true); @@ -48,7 +48,7 @@ int main() { moNeighborComparator ncomp; moSolNeighborComparator sncomp; - moSimpleHCneutralExplorer test(nh, eval, ncomp, sncomp); + moRandomBestHCExplorer test(nh, eval, ncomp, sncomp); //test qu'on ameliore bien a chaque itération test.initParam(sol); @@ -94,7 +94,7 @@ int main() { test.updateParam(sol); - std::cout << "[t-moSimpleHCneutralExplorer] => OK" << std::endl; + std::cout << "[t-moRandomBestHCExplorer] => OK" << std::endl; return EXIT_SUCCESS; } diff --git a/trunk/paradiseo-mo/test/t-moSolNeighborComparator.cpp b/trunk/paradiseo-mo/test/t-moSolNeighborComparator.cpp index 2b5df96f0..b98996141 100644 --- a/trunk/paradiseo-mo/test/t-moSolNeighborComparator.cpp +++ b/trunk/paradiseo-mo/test/t-moSolNeighborComparator.cpp @@ -32,7 +32,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ -#include +#include #include #include #include diff --git a/trunk/paradiseo-mo/tutorial/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/CMakeLists.txt index 85355a698..2fc13942e 100644 --- a/trunk/paradiseo-mo/tutorial/CMakeLists.txt +++ b/trunk/paradiseo-mo/tutorial/CMakeLists.txt @@ -1 +1 @@ -#ADD_SUBDIRECTORY(oneMax) \ No newline at end of file +ADD_SUBDIRECTORY(oneMax) \ No newline at end of file diff --git a/trunk/paradiseo-mo/tutorial/oneMax/application/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/oneMax/application/CMakeLists.txt index 4c6310333..9a8125924 100644 --- a/trunk/paradiseo-mo/tutorial/oneMax/application/CMakeLists.txt +++ b/trunk/paradiseo-mo/tutorial/oneMax/application/CMakeLists.txt @@ -7,7 +7,7 @@ LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ADD_EXECUTABLE(testSimpleHC testSimpleHC.cpp) ADD_EXECUTABLE(testFirstImpr testFirstImpr.cpp) ADD_EXECUTABLE(testRandomWalk testRandomWalk.cpp) -ADD_EXECUTABLE(testSimpleHCneutral testSimpleHCneutral.cpp) +ADD_EXECUTABLE(testRandomBestHC testRandomBestHC.cpp) ADD_EXECUTABLE(testHCneutral testHCneutral.cpp) ADD_EXECUTABLE(testMetropolisHasting testMetropolisHasting.cpp) #ADD_EXECUTABLE(testWithMove testWithMove.cpp) @@ -19,7 +19,7 @@ ADD_EXECUTABLE(testSimulatedAnnealing testSimulatedAnnealing.cpp) TARGET_LINK_LIBRARIES(testSimpleHC eoutils ga eo) TARGET_LINK_LIBRARIES(testFirstImpr eoutils ga eo) TARGET_LINK_LIBRARIES(testRandomWalk eoutils ga eo) -TARGET_LINK_LIBRARIES(testSimpleHCneutral eoutils ga eo) +TARGET_LINK_LIBRARIES(testRandomBestHC eoutils ga eo) TARGET_LINK_LIBRARIES(testHCneutral eoutils ga eo) TARGET_LINK_LIBRARIES(testMetropolisHasting eoutils ga eo) #TARGET_LINK_LIBRARIES(testWithMove eoutils ga eo) diff --git a/trunk/paradiseo-mo/tutorial/oneMax/application/testILS.cpp b/trunk/paradiseo-mo/tutorial/oneMax/application/testILS.cpp index 606df85d5..0c1866056 100644 --- a/trunk/paradiseo-mo/tutorial/oneMax/application/testILS.cpp +++ b/trunk/paradiseo-mo/tutorial/oneMax/application/testILS.cpp @@ -194,9 +194,9 @@ void main_function(int argc, char **argv) moILSexplorer< Neighbor > explorerILS(hc, perturb, accept); - moIterContinuator > continuatorILS(100); + moIterContinuator > continuatorILS(100); - moLocalSearch >localSearch(explorerILS, continuatorILS, eval); + moLocalSearch >localSearch(explorerILS, continuatorILS, eval); /* ========================================================= diff --git a/trunk/paradiseo-mo/tutorial/oneMax/application/testSimpleHCneutral.cpp b/trunk/paradiseo-mo/tutorial/oneMax/application/testRandomBestHC.cpp similarity index 96% rename from trunk/paradiseo-mo/tutorial/oneMax/application/testSimpleHCneutral.cpp rename to trunk/paradiseo-mo/tutorial/oneMax/application/testRandomBestHC.cpp index 226fc8290..fda13d9c7 100644 --- a/trunk/paradiseo-mo/tutorial/oneMax/application/testSimpleHCneutral.cpp +++ b/trunk/paradiseo-mo/tutorial/oneMax/application/testRandomBestHC.cpp @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -/** testSimpleHCneutral.cpp +/** testRandomBestHC.cpp * * SV - 24/01/10 * @@ -34,7 +34,7 @@ using namespace std; #include #include #include -#include +#include // REPRESENTATION //----------------------------------------------------------------------------- @@ -149,7 +149,7 @@ void main_function(int argc, char **argv) * * ========================================================= */ - moSimpleHCneutralExplorer explorer(neighborhood, fulleval, comparator, solComparator); + moRandomBestHCExplorer explorer(neighborhood, fulleval, comparator, solComparator); /* ========================================================= diff --git a/trunk/paradiseo-mo/tutorial/oneMax/application/testRandomNeutralWalk.cpp b/trunk/paradiseo-mo/tutorial/oneMax/application/testRandomNeutralWalk.cpp index 5a015d4ac..9551ddcfc 100644 --- a/trunk/paradiseo-mo/tutorial/oneMax/application/testRandomNeutralWalk.cpp +++ b/trunk/paradiseo-mo/tutorial/oneMax/application/testRandomNeutralWalk.cpp @@ -26,7 +26,7 @@ using namespace std; #include #include #include -#include +#include #include #include diff --git a/trunk/paradiseo-mo/tutorial/oneMax/src/oneMaxBitNeighbor.h b/trunk/paradiseo-mo/tutorial/oneMax/src/oneMaxBitNeighbor.h index 3ab1328f8..910ae7c30 100644 --- a/trunk/paradiseo-mo/tutorial/oneMax/src/oneMaxBitNeighbor.h +++ b/trunk/paradiseo-mo/tutorial/oneMax/src/oneMaxBitNeighbor.h @@ -1,7 +1,7 @@ #ifndef _oneMaxBitNeighbor_h #define _oneMaxBitNeighbor_h -#include +#include #include /*