diff --git a/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighbor.h b/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighbor.h index eb988cfed..1d1c7d9db 100644 --- a/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighbor.h +++ b/trunk/paradiseo-mo/src/problems/permutation/moSwapNeighbor.h @@ -79,6 +79,17 @@ public: _second = indices.second; } + /** + * @param _neighbor a neighbor + * @return if _neighbor and this one are equals + */ + virtual bool equals(moSwapNeighbor& _neighbor) { + unsigned f, s; + _neighbor.getIndices(f, s); + return ((indices.first == f) && (indices.second == s) || (indices.first + == s) && (indices.second == f)); + } + /** * Print the Neighbor */