From 9a4cb58c6c50d1f94c7b5085f585e04824401537 Mon Sep 17 00:00:00 2001 From: boufaras Date: Wed, 13 Oct 2010 15:36:14 +0000 Subject: [PATCH] git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1958 331e1502-861f-0410-8da2-ba01fb791d7f --- .../src/problems/permutation/moSwapNeighborhood.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighborhood.h b/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighborhood.h index 7666c67c9..27a24c4ec 100644 --- a/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighborhood.h +++ b/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighborhood.h @@ -57,7 +57,7 @@ public: virtual void init(EOT& _solution, Neighbor& _current) { indices.first=0; indices.second=1; - size=_solution.size(); + // size=_solution.size(); _current.setIndices(0,1); } @@ -67,7 +67,7 @@ public: * @param _current the next neighbor */ virtual void next(EOT& _solution, Neighbor& _current) { - if (indices.second==size-1) { + if (indices.second==_solution.size()-1) { indices.first++; indices.second=indices.first+1; } @@ -82,7 +82,7 @@ public: * @return true if there is again a neighbor not explored */ virtual bool cont(EOT& _solution) { - return !((indices.first == (size-2)) && (indices.second == (size-1))); + return !((indices.first == (_solution.size()-2)) && (indices.second == (_solution.size()-1))); } /** @@ -95,7 +95,7 @@ public: private: std::pair indices; - unsigned int size; + //unsigned int size; }; #endif