git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2077 331e1502-861f-0410-8da2-ba01fb791d7f

This commit is contained in:
boufaras 2011-01-27 12:54:34 +00:00
commit b850eb8340

View file

@ -50,7 +50,7 @@ static int factorial(int i) {
* @param _Kswap the number of swap * @param _Kswap the number of swap
*/ */
static int sizeMapping(int _size,unsigned int _Kswap) { static int sizeMapping(int _size, unsigned int _Kswap) {
int _sizeMapping = _size; int _sizeMapping = _size;
for (int i = _Kswap; i > 0; i--) { for (int i = _Kswap; i > 0; i--) {
@ -81,8 +81,8 @@ public:
* @param _Kswap the number of swap * @param _Kswap the number of swap
*/ */
moKswapNeighborhood(unsigned int _size,unsigned int _Kswap) : moKswapNeighborhood(unsigned int _size, unsigned int _Kswap) :
moOrderNeighborhood<Neighbor> (sizeMapping(_size,_Kswap)) { moOrderNeighborhood<Neighbor> (sizeMapping(_size, _Kswap)) {
mutex = true; mutex = true;
size = _size; size = _size;
@ -174,8 +174,7 @@ public:
mapping[id + k * neighborhoodSize] = _indices[k]; mapping[id + k * neighborhoodSize] = _indices[k];
} }
mapping[id + Kswap * neighborhoodSize] mapping[id + Kswap * neighborhoodSize] = _indices[Kswap]++;
= _indices[Kswap]++;
id++; id++;
} }
@ -195,9 +194,9 @@ public:
} }
/** /**
* Compute the next combination of mapping indices * Compute the next combination of mapping indexes
* @param _indices the current combination of indices * @param _indices the current combination of indexes
* @param _indice compute next combination of indices from this index * @param _indice compute next combination of indexes from this index
*/ */
bool nextIndices(unsigned int* _indices, int _indice) { bool nextIndices(unsigned int* _indices, int _indice) {