update comment

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2276 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
boufaras 2011-06-01 08:29:37 +00:00
commit 841e0fc9b6

View file

@ -30,7 +30,7 @@
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
Contact: paradiseo-help@lists.gforge.inria.fr
*/
*/
#ifndef _IndexNeighbor_h
#define _IndexNeighbor_h
@ -40,9 +40,8 @@
/**
* Index Neighbor
*/
template< class EOT, class Fitness=typename EOT::Fitness >
class moIndexNeighbor : virtual public moNeighbor<EOT, Fitness>
{
template<class EOT, class Fitness = typename EOT::Fitness>
class moIndexNeighbor: virtual public moNeighbor<EOT, Fitness> {
public:
using moNeighbor<EOT, Fitness>::fitness;
@ -50,14 +49,17 @@ public:
/**
* Default Constructor
*/
moIndexNeighbor() : moNeighbor<EOT, Fitness>(), key(0) {}
moIndexNeighbor() :
moNeighbor<EOT, Fitness> (), key(0) {
}
/**
* Copy Constructor
* @param _n the neighbor to copy
*/
moIndexNeighbor(const moIndexNeighbor& _n) : moNeighbor<EOT, Fitness>(_n) {
this->key = _n.key ;
moIndexNeighbor(const moIndexNeighbor& _n) :
moNeighbor<EOT, Fitness> (_n) {
this->key = _n.key;
}
/**
@ -65,10 +67,19 @@ public:
* @param _source the source neighbor
*/
moIndexNeighbor<EOT, Fitness> & operator=(const moIndexNeighbor<EOT, Fitness> & _source) {
moIndexNeighbor<EOT, Fitness> & operator=(const moIndexNeighbor<EOT,
Fitness> & _source) {
moNeighbor<EOT, Fitness>::operator=(_source);
this->key = _source.key ;
return *this ;
this->key = _source.key;
return *this;
}
/**
* Move a solution
* @param _solution the related solution
*/
virtual void move(EOT & _solution) {
}
/**
@ -92,7 +103,7 @@ public:
* @param _key index of the IndexNeighbor
*/
void index(unsigned int _key) {
key=_key;
key = _key;
}
/**
@ -100,7 +111,7 @@ public:
* @return if _neighbor and this one are equals
*/
virtual bool equals(moIndexNeighbor<EOT>& _neighbor) {
return (key==_neighbor.index());
return (key == _neighbor.index());
}
protected: