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:
parent
f47bc32510
commit
47fde2cc3e
1 changed files with 58 additions and 44 deletions
|
|
@ -41,8 +41,7 @@
|
||||||
* 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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue