Clean
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2194 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
5bf7a1424f
commit
1ae3880071
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue