solver: construct odd-order solutions
Avoid repeating the exponential search for odd orders at least nine. Search the even predecessor, translate its row-major placements to the enlarged board, and tile the new border. Keep direct search and construction explicit so benchmarks can report their costs separately. Verify the routed order-9 result independently and require its search counters to match order 8. Tests: Release, Debug, ASan and UBSan CTest (8 passed each) Refs: #6
This commit was merged in pull request #21.
This commit is contained in:
+4
-2
@@ -12,8 +12,10 @@ ctest --test-dir build --output-on-failure
|
||||
The tests independently check board dimensions, square multiplicities, bounds,
|
||||
overlap, and complete coverage. They cover small unsatisfiable solver inputs, a
|
||||
known order-8 solution, invalid placement diagnostics, and construction of an
|
||||
order-9 solution from the order-8 fixture. The rendering test also formats the
|
||||
known order-8 solution and checks the resulting grid dimensions and coverage.
|
||||
order-9 solution from the order-8 fixture. The routed order-9 solver test
|
||||
checks that its search counters exactly match order 8. The rendering test also
|
||||
formats the known order-8 solution and checks the resulting grid dimensions and
|
||||
coverage.
|
||||
|
||||
## Debug and sanitizers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user