introduce bitloops

This commit is contained in:
mike
2026-01-17 03:14:13 +01:00
parent 57be64c37e
commit 44f53801a3
5 changed files with 57 additions and 51 deletions

View File

@@ -97,7 +97,7 @@ public class Main {
}
section("Result");
res.filled().calcSimpel();
res.filled().stats().simplicity = FillResult.calcSimpel(res.slots());
info(String.format(Locale.ROOT, "simplicity : %.2f", res.filled().stats().simplicity));
section("Mask");
@@ -396,9 +396,9 @@ public class Main {
TOTAL_NODES.addAndGet(filled.stats().nodes);
TOTAL_BACKTRACKS.addAndGet(filled.stats().backtracks);
if (filled.ok()) {
filled.calcSimpel();
val simpel = FillResult.calcSimpel(slotInfo);
TOTAL_SUCCESS.incrementAndGet();
TOTAL_SIMPLICITY.addAndGet((long) (filled.stats().simplicity * 100));
TOTAL_SIMPLICITY.addAndGet((long) (simpel * 100));
}
var name = Thread.currentThread().getName();
@@ -413,7 +413,7 @@ public class Main {
);
if (filled.ok() && (opts.minSimplicity <= 0 || filled.stats().simplicity >= opts.minSimplicity)) {
return new PuzzleResult(new Clued(mask), filled);
return new PuzzleResult(new Clued(mask), slotInfo, filled);
}
if (opts.verbose && filled.ok()) {