introduce bitloops

This commit is contained in:
mike
2026-01-17 21:43:17 +01:00
parent 938d2ac66b
commit 19812d81e5
5 changed files with 34 additions and 36 deletions

View File

@@ -75,6 +75,10 @@ public record Masker(Rng rng, int[] stack, Clues cache) {
grid.forEachSlot((key, lo, hi) -> slots[N[0]++] = Slot.from(key, lo, hi, index[Slot.length(lo, hi)]));
return slots;
}
public static Slotinfo[] slots(Clues mask, DictEntry[] index) {
var slots = Masker.extractSlots(mask, index);
return Masker.scoreSlots(slots);
}
public static Slotinfo[] scoreSlots(Slot[] slots) {
val count = new byte[SwedishGenerator.SIZE];
Slotinfo[] slotInfo = new Slotinfo[slots.length];