From 3b8fad1a2b39fdd69caae73e842b209b58d8f084 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 19 Feb 2007 19:38:00 +0000 Subject: [PATCH] Forgot to shuffle the num[] array! That was probably introducing some really subtle probabilistic bias in the generated latin squares. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7302 cda61777-01e9-0310-a592-d414129be87e --- latin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/latin.c b/latin.c index 22488a7..2d6ae74 100644 --- a/latin.c +++ b/latin.c @@ -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; -- 2.11.0