summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d68ba4b)
some really subtle probabilistic bias in the generated latin squares.
[originally from svn r7302]
for (j = 0; j < o; j++)
col[j] = num[j] = j;
shuffle(col, j, sizeof(*col), rs);
for (j = 0; j < o; j++)
col[j] = num[j] = j;
shuffle(col, j, sizeof(*col), rs);
+ shuffle(num, j, sizeof(*num), rs);
/* We need the num permutation in both forward and inverse forms. */
for (j = 0; j < o; j++)
numinv[num[j]] = j;
/* We need the num permutation in both forward and inverse forms. */
for (j = 0; j < o; j++)
numinv[num[j]] = j;