From 32659132197c38eccec5b1a33a8760cc49dd29de Mon Sep 17 00:00:00 2001 From: boufaras Date: Fri, 11 Mar 2011 16:01:59 +0000 Subject: [PATCH] clean git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2185 331e1502-861f-0410-8da2-ba01fb791d7f --- .../paradiseo-mo/src/neighborhood/moKswapNeighborhood.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/trunk/paradiseo-mo/src/neighborhood/moKswapNeighborhood.h b/trunk/paradiseo-mo/src/neighborhood/moKswapNeighborhood.h index f78f5fc61..f8cb0d612 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moKswapNeighborhood.h +++ b/trunk/paradiseo-mo/src/neighborhood/moKswapNeighborhood.h @@ -109,16 +109,14 @@ public: virtual void init(EOT& _solution, Neighbor& _current) { //Compute the mapping only for the first init - if (mutex) { + if (mutex==true) { setMapping(); mutex = false; } - moOrderNeighborhood::init(_solution, _current); _current.setKswap(Kswap); _current.reSizeIndices(Kswap); _current.setSize(_solution.size()); - getMapping(currentIndex); _current.setIndices(indices); } @@ -129,11 +127,9 @@ public: * @param _current the next neighbor */ virtual void next(EOT& _solution, Neighbor& _current) { - moOrderNeighborhood::next(_solution, _current); getMapping(currentIndex); _current.setIndices(indices); - } /** @@ -142,8 +138,9 @@ public: */ virtual void getMapping(unsigned int _currentIndex) { - for (unsigned int i = 0; i <= Kswap; i++) + for (unsigned int i = 0; i <= Kswap; i++){ indices[i] = mapping[_currentIndex + i * neighborhoodSize]; + } } /**