add Setter & getter of neighborhoodSize

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1967 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
boufaras 2010-10-19 08:47:16 +00:00
commit 47fde2cc3e

View file

@ -30,7 +30,7 @@
ParadisEO WebSite : http://paradiseo.gforge.inria.fr ParadisEO WebSite : http://paradiseo.gforge.inria.fr
Contact: paradiseo-help@lists.gforge.inria.fr Contact: paradiseo-help@lists.gforge.inria.fr
*/ */
#ifndef _moIndexNeighborhood_h #ifndef _moIndexNeighborhood_h
#define _moIndexNeighborhood_h #define _moIndexNeighborhood_h
@ -40,9 +40,8 @@
/** /**
* A Indexed Neighborhood * A Indexed Neighborhood
*/ */
template< class Neighbor > template<class Neighbor>
class moIndexNeighborhood : virtual public moNeighborhood<Neighbor> class moIndexNeighborhood: virtual public moNeighborhood<Neighbor> {
{
public: public:
/** /**
* Define type of a solution corresponding to Neighbor * Define type of a solution corresponding to Neighbor
@ -53,12 +52,27 @@ public:
* Constructor * Constructor
* @param _neighborhoodSize the size of the neighborhood * @param _neighborhoodSize the size of the neighborhood
*/ */
moIndexNeighborhood(unsigned int _neighborhoodSize):neighborhoodSize(_neighborhoodSize) {} moIndexNeighborhood(unsigned int _neighborhoodSize) :
neighborhoodSize(_neighborhoodSize) {
}
unsigned int size(){ /**
* getter to get the value of neighborhoodSize
* @return the neighborhoodSize
*/
unsigned int getNeighborhoodSize() {
return neighborhoodSize; return neighborhoodSize;
} }
/**
* Setter to fixe the neighoodSize
* @param _neighborhoodSize the value to set
*/
void setNeighborhoodSize(unsigned int _neighborhoodSize) {
neighborhoodSize = _neighborhoodSize;
}
protected: protected:
// size of the neighborhood // size of the neighborhood
unsigned int neighborhoodSize; unsigned int neighborhoodSize;