introduce bitloops
This commit is contained in:
@@ -973,7 +973,7 @@ public record SwedishGenerator(Rng rng, int[] stack, Clues cache) {
|
||||
return true;
|
||||
}
|
||||
void chooseMRV() {
|
||||
SwedishGenerator.Slotinfo best = null;
|
||||
Slotinfo best = null;
|
||||
for (int i = 0, count, count2 = -1, bestScore = -1, n = TOTAL; i < n; i++) {
|
||||
var s = slots[i];
|
||||
if (s.assign.w != X) continue;
|
||||
@@ -1049,11 +1049,9 @@ public record SwedishGenerator(Rng rng, int[] stack, Clues cache) {
|
||||
if (!placeWord(k, slo, shi, w)) continue;
|
||||
|
||||
Bit1029.set(used, lemIdx);
|
||||
//assigned[k] = w;
|
||||
s.assign.w = w;
|
||||
if (backtrack(depth + 1)) return true;
|
||||
s.assign.w = X;
|
||||
//assigned[k] = X;
|
||||
Bit1029.clear(used, lemIdx);
|
||||
glo = low;
|
||||
ghi = top;
|
||||
@@ -1073,15 +1071,13 @@ public record SwedishGenerator(Rng rng, int[] stack, Clues cache) {
|
||||
low = glo;
|
||||
top = ghi;
|
||||
if (!placeWord(k, slo, shi, w)) continue;
|
||||
|
||||
|
||||
Bit1029.set(used, lemIdx);
|
||||
s.assign.w = w;
|
||||
//assigned[k] = w;
|
||||
|
||||
if (backtrack(depth + 1)) return true;
|
||||
s.assign.w = X;
|
||||
//assigned[k] = X;
|
||||
Bit1029.clear(used, lemIdx);
|
||||
|
||||
glo = low;
|
||||
ghi = top;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user