diff options
| author | Simon Tatham <anakin@pobox.com> | 2007-02-19 19:38:00 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2007-02-19 19:38:00 +0000 |
| commit | aa6fb7507252dec76e2c30ebfdc76b0e366851d7 (patch) | |
| tree | 36331875cc7b98ac7669c9ba4415c8f6f9aec234 /latin.c | |
| parent | d68ba4b21e11928fc256caca6d8836ac986848ad (diff) | |
| download | puzzles-aa6fb7507252dec76e2c30ebfdc76b0e366851d7.zip puzzles-aa6fb7507252dec76e2c30ebfdc76b0e366851d7.tar.gz puzzles-aa6fb7507252dec76e2c30ebfdc76b0e366851d7.tar.bz2 puzzles-aa6fb7507252dec76e2c30ebfdc76b0e366851d7.tar.xz | |
Forgot to shuffle the num[] array! That was probably introducing
some really subtle probabilistic bias in the generated latin squares.
[originally from svn r7302]
Diffstat (limited to 'latin.c')
| -rw-r--r-- | latin.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1092,6 +1092,7 @@ digit *latin_generate(int o, random_state *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; |