git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2099 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
de55513417
commit
df06711ef3
1 changed files with 6 additions and 6 deletions
|
|
@ -33,15 +33,15 @@
|
||||||
#include <neighborhood/moOrderNeighborhood.h>
|
#include <neighborhood/moOrderNeighborhood.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the factorial of an unsigned integer
|
* @return the factorial of an integer
|
||||||
* @param _i an integer
|
* @param _i an integer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int factorial(int i) {
|
static int factorial(int _i) {
|
||||||
if (i == 0)
|
if (_i == 0)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return i * factorial(i - 1);
|
return _i * factorial(_i - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -50,8 +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--) {
|
||||||
_sizeMapping *= (_size - i);
|
_sizeMapping *= (_size - i);
|
||||||
|
|
@ -119,6 +118,7 @@ public:
|
||||||
_current.setKswap(Kswap);
|
_current.setKswap(Kswap);
|
||||||
_current.reSizeIndices(Kswap);
|
_current.reSizeIndices(Kswap);
|
||||||
_current.setSize(_solution.size());
|
_current.setSize(_solution.size());
|
||||||
|
|
||||||
getMapping(currentIndex);
|
getMapping(currentIndex);
|
||||||
_current.setIndices(indices);
|
_current.setIndices(indices);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue