git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2194 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
boufaras 2011-03-15 09:30:09 +00:00
commit 1ae3880071

View file

@ -85,15 +85,15 @@ public:
void create() {
unsigned random;
int temp;
int tmp;
for (unsigned i = 0; i < N; i++)
vect[i] = i;
// we want a random permutation so we shuffle
for (unsigned i = 0; i < N; i++) {
random = rng.rand() % (N - i) + i;
temp = vect[i];
tmp = vect[i];
vect[i] = vect[random];
vect[random] = temp;
vect[random] = tmp;
}
}