From 1bd2d3e18b4f640125c3e6308a9a41aa33d67c1b Mon Sep 17 00:00:00 2001 From: jhumeau Date: Fri, 22 Jan 2010 15:35:36 +0000 Subject: [PATCH] =?UTF-8?q?IndexNeighborhoods=20rajout=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1668 331e1502-861f-0410-8da2-ba01fb791d7f --- .../src/neighborhood/moBackableNeighbor.h | 4 +- .../newMo/src/neighborhood/moBitNeighbor.h | 62 ++------- .../newMo/src/neighborhood/moIndexNeighbor.h | 101 ++++++++++++++ .../src/neighborhood/moIndexNeighborhood.h | 62 +++++++++ ...itNeighborhood.h => moOrderNeighborhood.h} | 62 ++++----- .../neighborhood/moRndWithReplNeighborhood.h | 102 ++++++++++++++ .../moRndWithoutReplNeighborhood.h | 129 ++++++++++++++++++ branches/newMo/src/newmo.h | 6 +- branches/newMo/test/CMakeLists.txt | 2 +- branches/newMo/test/t-moBitNeighbor.cpp | 4 - ...hborhood.cpp => t-moOrderNeighborhood.cpp} | 12 +- .../oneMax/application/testSimpleHC.cpp | 6 +- 12 files changed, 451 insertions(+), 101 deletions(-) create mode 100644 branches/newMo/src/neighborhood/moIndexNeighbor.h create mode 100644 branches/newMo/src/neighborhood/moIndexNeighborhood.h rename branches/newMo/src/neighborhood/{moBitNeighborhood.h => moOrderNeighborhood.h} (74%) create mode 100644 branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h create mode 100644 branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h rename branches/newMo/test/{t-moBitNeighborhood.cpp => t-moOrderNeighborhood.cpp} (88%) diff --git a/branches/newMo/src/neighborhood/moBackableNeighbor.h b/branches/newMo/src/neighborhood/moBackableNeighbor.h index cfa5743c2..ac4324c77 100644 --- a/branches/newMo/src/neighborhood/moBackableNeighbor.h +++ b/branches/newMo/src/neighborhood/moBackableNeighbor.h @@ -41,7 +41,7 @@ * Neighbor with a move back function to use in a moFullEvalByModif */ template< class EOT , class Fitness > -class moBackableNeighbor : public moNeighbor +class moBackableNeighbor : virtual public moNeighbor { public: @@ -49,7 +49,7 @@ public: * the move back function * @param _solution the solution to moveBack */ - virtual void moveBack(EOT & _solution){} + virtual void moveBack(EOT & _solution)=0; }; diff --git a/branches/newMo/src/neighborhood/moBitNeighbor.h b/branches/newMo/src/neighborhood/moBitNeighbor.h index 0480f5daa..3c4ccd35f 100644 --- a/branches/newMo/src/neighborhood/moBitNeighbor.h +++ b/branches/newMo/src/neighborhood/moBitNeighbor.h @@ -37,51 +37,26 @@ #include #include +#include /** * Neighbor related to a vector of Bit */ template< class Fitness > -class moBitNeighbor : public moBackableNeighbor, Fitness> +class moBitNeighbor : public moBackableNeighbor, Fitness>, public moIndexNeighbor, Fitness> { public: typedef eoBit EOT ; - using moNeighbor, Fitness>::fitness; - - /** - * Default Constructor - */ - moBitNeighbor() : moBackableNeighbor , Fitness>(), bit(0) { } ; - - /** - * Copy Constructor - */ - moBitNeighbor(const moBitNeighbor& _n) : moBackableNeighbor , Fitness>(_n) { - this->bit = _n.bit ; - } ; - - /** - * Constructor - * @param _b index - */ - moBitNeighbor(unsigned int _b) : moBackableNeighbor , Fitness>() , bit(_b) { } ; - - /** - * Assignment operator - */ - virtual moBitNeighbor & operator=(const moBitNeighbor & _source) { - moNeighbor::operator=(_source); - this->bit = _source.bit ; - return *this ; - } + using moBackableNeighbor, Fitness>::fitness; + using moIndexNeighbor, Fitness>::key; /** * move the solution * @param _solution the solution to move */ virtual void move(EOT & _solution) { - _solution[bit] = !_solution[bit]; + _solution[key] = !_solution[key]; } /** @@ -89,7 +64,7 @@ public: * @param _solution the solution to move back */ virtual void moveBack(EOT & _solution) { - _solution[bit] = !_solution[bit]; + _solution[key] = !_solution[key]; } /** @@ -119,7 +94,7 @@ public: Fitness repFit ; _is.seekg(pos); // rewind _is >> repFit; - _is >> bit; + _is >> key; fitness(repFit); } } @@ -129,29 +104,8 @@ public: * @param _os A std::ostream. */ virtual void printOn(std::ostream& _os) const { - _os << fitness() << ' ' << bit << std::endl; + _os << fitness() << ' ' << key << std::endl; } - - /** - * Getter - * @return index of the bitNeighbor - */ - unsigned int index(){ - return bit; - } - - /** - * Setter - * @param index of the bitNeighbor - */ - void index(unsigned int _bit){ - bit=_bit; - } - -private: - // describe the neighbor - unsigned int bit ; - }; #endif diff --git a/branches/newMo/src/neighborhood/moIndexNeighbor.h b/branches/newMo/src/neighborhood/moIndexNeighbor.h new file mode 100644 index 000000000..c847332fb --- /dev/null +++ b/branches/newMo/src/neighborhood/moIndexNeighbor.h @@ -0,0 +1,101 @@ +/* + + 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 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 _IndexNeighbor_h +#define _IndexNeighbor_h + +#include + +/** + * Neighbor related to a vector of Bit + */ +template< class EOT , class Fitness > +class moIndexNeighbor : virtual public moNeighbor +{ +public: + + using moNeighbor::fitness; + + /** + * Default Constructor + */ + moIndexNeighbor() : moNeighbor(), key(0){} + + /** + * Copy Constructor + */ + moIndexNeighbor(const moIndexNeighbor& _n) : moNeighbor(_n) { + this->key = _n.key ; + } + + /** + * Assignment operator + */ + virtual moIndexNeighbor & operator=(const moIndexNeighbor & _source) { + moNeighbor::operator=(_source); + this->key = _source.key ; + return *this ; + } + + /** + * Return the class id. + * @return the class name as a std::string + */ + virtual std::string className() const { + return "moIndexNeighbor"; + } + + /** + * Getter + * @return index of the IndexNeighbor + */ + unsigned int index(){ + return key; + } + + /** + * Setter + * @param index of the IndexNeighbor + */ + void index(unsigned int _key){ + key=_key; + } + +protected: + // key allowing to describe the neighbor + unsigned int key; + +}; + +#endif diff --git a/branches/newMo/src/neighborhood/moIndexNeighborhood.h b/branches/newMo/src/neighborhood/moIndexNeighborhood.h new file mode 100644 index 000000000..559342d7c --- /dev/null +++ b/branches/newMo/src/neighborhood/moIndexNeighborhood.h @@ -0,0 +1,62 @@ +/* + + 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 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 _moIndexNeighborhood_h +#define _moIndexNeighborhood_h + +#include + +/** + * A Indexed Neighborhood + */ +template< class Neighbor > +class moIndexNeighborhood : public moNeighborhood +{ +public: + /** + * Define type of a solution corresponding to Neighbor + */ + typedef typename Neighbor::EOT EOT; + + /** + * Constructor + * @param _neighborhood the size of the neighborhood + */ + moIndexNeighborhood(unsigned int _neighborhoodSize):neighborhoodSize(_neighborhoodSize){} + +protected: + unsigned int neighborhoodSize; +}; + +#endif diff --git a/branches/newMo/src/neighborhood/moBitNeighborhood.h b/branches/newMo/src/neighborhood/moOrderNeighborhood.h similarity index 74% rename from branches/newMo/src/neighborhood/moBitNeighborhood.h rename to branches/newMo/src/neighborhood/moOrderNeighborhood.h index a6a16c839..3df825d5e 100644 --- a/branches/newMo/src/neighborhood/moBitNeighborhood.h +++ b/branches/newMo/src/neighborhood/moOrderNeighborhood.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,34 +32,42 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ -#ifndef _bitNeighborhood_h -#define _bitNeighborhood_h +#ifndef _moOrderNeighborhood_h +#define _moOrderNeighborhood_h -#include -#include +#include /** - * Neighborhood related to a vector of Bit + * A Ordered Neighborhood */ template< class N > -class moBitNeighborhood : public moNeighborhood +class moOrderNeighborhood : public moIndexNeighborhood { public: - typedef N Neighbor ; - typedef typename Neighbor::EOT EOT ; + + /** + * Define type of a solution corresponding to Neighbor + */ + typedef N Neighbor; + typedef typename Neighbor::EOT EOT; + + + using moIndexNeighborhood::neighborhoodSize; + /** - * Default Constructor + * Constructor + * @param _neighborhood the size of the neighborhood */ - moBitNeighborhood() : moNeighborhood(), currentBit(0) { } + moOrderNeighborhood(unsigned int _neighborhoodSize): moIndexNeighborhood(_neighborhoodSize), currentIndex(0){} /** * Test if it exist a neighbor * @param _solution the solution to explore - * @return always True + * @return true if the neighborhood was not empty */ virtual bool hasNeighbor(EOT& _solution) { - return true; + return neighborhoodSize > 0; } /** @@ -68,9 +76,9 @@ public: * @param _neighbor the first neighbor */ virtual void init(EOT & _solution, Neighbor & _neighbor) { - currentBit = 0 ; - _neighbor.index(currentBit) ; - } + currentIndex = 0 ; + _neighbor.index(currentIndex) ; + } /** * Give the next neighbor @@ -78,9 +86,9 @@ public: * @param _neighbor the next neighbor */ virtual void next(EOT & _solution, Neighbor & _neighbor) { - currentBit++ ; - _neighbor.index(currentBit); - } + currentIndex++ ; + _neighbor.index(currentIndex); + } /** * test if all neighbors are explore or not,if false, there is no neighbor left to explore @@ -88,7 +96,7 @@ public: * @return true if there is again a neighbor to explore */ virtual bool cont(EOT & _solution) { - return (currentBit < _solution.size()) ; + return (currentIndex < neighborhoodSize) ; } /** @@ -96,20 +104,12 @@ public: * @return the position in the Neighborhood */ unsigned int position(){ - return currentBit; + return currentIndex; } - - /** - * Return the class id. - * @return the class name as a std::string - */ - virtual std::string className() const { return "moBitNeighborhood"; } private: - //Position in the neighborhood - unsigned int currentBit; + unsigned int currentIndex; + }; - #endif - diff --git a/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h b/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h new file mode 100644 index 000000000..93602c6e6 --- /dev/null +++ b/branches/newMo/src/neighborhood/moRndWithReplNeighborhood.h @@ -0,0 +1,102 @@ +/* + + 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 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 _moRndWithReplNeighborhood_h +#define _moRndWithReplNeighborhood_h + +#include +#include + +/** + * A Random With replacement Neighborhood + */ +template< class N > +class moRndWithReplNeighborhood : public moIndexNeighborhood +{ +public: + + /** + * Define type of a solution corresponding to Neighbor + */ + typedef N Neighbor; + typedef typename Neighbor::EOT EOT; + + + using moIndexNeighborhood::neighborhoodSize; + + /** + * Constructor + * @param _neighborhood the size of the neighborhood + */ + moRndWithReplNeighborhood(unsigned int _neighborhoodSize): moIndexNeighborhood(_neighborhoodSize){} + + /** + * Test if it exist a neighbor + * @param _solution the solution to explore + * @return true if the neighborhood was not empty + */ + virtual bool hasNeighbor(EOT& _solution) { + return neighborhoodSize > 0; + } + + /** + * Initialization of the neighborhood + * @param _solution the solution to explore + * @param _neighbor the first neighbor + */ + virtual void init(EOT & _solution, Neighbor & _neighbor) { + _neighbor.index(rng.random(neighborhoodSize)); + } + + /** + * Give the next neighbor + * @param _solution the solution to explore + * @param _neighbor the next neighbor + */ + virtual void next(EOT & _solution, Neighbor & _neighbor) { + _neighbor.index(rng.random(neighborhoodSize)); + } + + /** + * test if all neighbors are explore or not,if false, there is no neighbor left to explore + * @param _solution the solution to explore + * @return true if there is again a neighbor to explore + */ + virtual bool cont(EOT & _solution) { + return neighborhoodSize > 0; + } + +}; + +#endif diff --git a/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h b/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h new file mode 100644 index 000000000..f4bd90339 --- /dev/null +++ b/branches/newMo/src/neighborhood/moRndWithoutReplNeighborhood.h @@ -0,0 +1,129 @@ +/* + + 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 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 _moRndWithoutReplNeighborhood_h +#define _moRndWithoutReplNeighborhood_h + +#include +#include + +/** + * A Random without replacement Neighborhood + */ +template< class N > +class moRndWithoutReplNeighborhood : public moIndexNeighborhood +{ +public: + + /** + * Define type of a solution corresponding to Neighbor + */ + typedef N Neighbor; + typedef typename Neighbor::EOT EOT; + + + using moIndexNeighborhood::neighborhoodSize; + + /** + * Constructor + * @param _neighborhood the size of the neighborhood + */ + moRndWithoutReplNeighborhood(unsigned int _neighborhoodSize): moIndexNeighborhood(_neighborhoodSize), maxIndex(0){ + for(unsigned int i=0; i < neighborhoodSize; i++) + indexVector.push_back(i); + } + + /** + * Test if it exist a neighbor + * @param _solution the solution to explore + * @return true if the neighborhood was not empty + */ + virtual bool hasNeighbor(EOT& _solution) { + return neighborhoodSize > 0; + } + + /** + * Initialization of the neighborhood + * @param _solution the solution to explore + * @param _neighbor the first neighbor + */ + virtual void init(EOT & _solution, Neighbor & _neighbor) { + unsigned int i, tmp; + maxIndex = neighborhoodSize ; + i = rng.random(maxIndex); + _neighbor.index(indexVector[i]); + tmp=indexVector[i]; + indexVector[i]=indexVector[maxIndex-1]; + indexVector[maxIndex-1]=tmp; + maxIndex--; + } + + /** + * Give the next neighbor + * @param _solution the solution to explore + * @param _neighbor the next neighbor + */ + virtual void next(EOT & _solution, Neighbor & _neighbor) { + unsigned int i, tmp; + i = rng.random(maxIndex); + _neighbor.index(indexVector[i]); + tmp=indexVector[i]; + indexVector[i]=indexVector[maxIndex-1]; + indexVector[maxIndex-1]=tmp; + maxIndex--; + } + + /** + * test if all neighbors are explore or not,if false, there is no neighbor left to explore + * @param _solution the solution to explore + * @return true if there is again a neighbor to explore + */ + virtual bool cont(EOT & _solution) { + return (maxIndex > 0) ; + } + + /** + * Getter + * @return the position in the Neighborhood + */ + unsigned int position(){ + return indexVector[maxIndex]; + } + +private: + unsigned int maxIndex; + std::vector indexVector; +}; + +#endif diff --git a/branches/newMo/src/newmo.h b/branches/newMo/src/newmo.h index 0b840402b..d7630a498 100755 --- a/branches/newMo/src/newmo.h +++ b/branches/newMo/src/newmo.h @@ -52,7 +52,11 @@ #include #include -#include +#include +#include +#include +#include +#include #include #include diff --git a/branches/newMo/test/CMakeLists.txt b/branches/newMo/test/CMakeLists.txt index 292a01898..6a8f5de9a 100644 --- a/branches/newMo/test/CMakeLists.txt +++ b/branches/newMo/test/CMakeLists.txt @@ -31,7 +31,7 @@ LINK_DIRECTORIES(${PARADISEO_EO_BIN_DIR}/lib) SET (TEST_LIST t-moNeighbor t-moBitNeighbor - t-moBitNeighborhood + t-moOrderNeighborhood t-moFullEvalByCopy t-moFullEvalByModif t-moSimpleHCexplorer) diff --git a/branches/newMo/test/t-moBitNeighbor.cpp b/branches/newMo/test/t-moBitNeighbor.cpp index ffc708c72..52375f3a2 100644 --- a/branches/newMo/test/t-moBitNeighbor.cpp +++ b/branches/newMo/test/t-moBitNeighbor.cpp @@ -51,10 +51,6 @@ int main(){ moBitNeighbor test1; assert(test1.index()==0); - //verif du constructeur indiquant le bit - moBitNeighbor hop(34); - assert(hop.index()==34); - //verif du setter d'index et du constructeur de copy test1.index(6); test1.fitness(2); diff --git a/branches/newMo/test/t-moBitNeighborhood.cpp b/branches/newMo/test/t-moOrderNeighborhood.cpp similarity index 88% rename from branches/newMo/test/t-moBitNeighborhood.cpp rename to branches/newMo/test/t-moOrderNeighborhood.cpp index d38e0a9ee..c3a29c465 100644 --- a/branches/newMo/test/t-moBitNeighborhood.cpp +++ b/branches/newMo/test/t-moOrderNeighborhood.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 @@ -32,14 +32,16 @@ Contact: paradiseo-help@lists.gforge.inria.fr */ -#include +#include +#include +#include #include #include int main(){ - std::cout << "[t-moBitNeighborhood] => START" << std::endl; + std::cout << "[t-moOrderNeighborhood] => START" << std::endl; //init sol eoBit sol; @@ -50,7 +52,7 @@ int main(){ moBitNeighbor neighbor; //verif du constructeur vide - moBitNeighborhood > test; + moOrderNeighborhood > test(3); assert(test.position()==0); //verif du hasneighbor @@ -72,6 +74,6 @@ int main(){ test.next(sol, neighbor); assert(!test.cont(sol)); - std::cout << "[t-moBitNeighborhood] => OK" << std::endl; + std::cout << "[t-moOrderNeighborhood] => OK" << std::endl; return EXIT_SUCCESS; } diff --git a/branches/newMo/tutorial/oneMax/application/testSimpleHC.cpp b/branches/newMo/tutorial/oneMax/application/testSimpleHC.cpp index bbc02b04e..e85af062f 100644 --- a/branches/newMo/tutorial/oneMax/application/testSimpleHC.cpp +++ b/branches/newMo/tutorial/oneMax/application/testSimpleHC.cpp @@ -25,7 +25,7 @@ using namespace std; // fitness function #include #include -#include +#include #include #include @@ -39,7 +39,7 @@ using namespace std; //----------------------------------------------------------------------------- typedef eoBit Indi; typedef moBitNeighbor Neighbor ; // incremental evaluation -typedef moBitNeighborhood Neighborhood ; +typedef moOrderNeighborhood Neighborhood ; void main_function(int argc, char **argv) { @@ -138,7 +138,7 @@ void main_function(int argc, char **argv) * * ========================================================= */ - Neighborhood neighborhood ; + Neighborhood neighborhood(vecSize); /* =========================================================