add equals method
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2057 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
a107e2925d
commit
e904c97447
1 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue