add equals method

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2057 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
boufaras 2011-01-11 14:29:29 +00:00
commit e904c97447

View file

@ -79,6 +79,17 @@ public:
_second = indices.second;
}
/**
* @param _neighbor a neighbor
* @return if _neighbor and this one are equals
*/
virtual bool equals(moSwapNeighbor<EOT>& _neighbor) {
unsigned f, s;
_neighbor.getIndices(f, s);
return ((indices.first == f) && (indices.second == s) || (indices.first
== s) && (indices.second == f));
}
/**
* Print the Neighbor
*/