Commit 40ff71b
Avoid generating redundant constraints by iterating over n^2/2 rather than n^2 pairs.
Ackermann constaints are symmetric so we don't need to consider every pair of indexes,
only every ordered pair. This can halve the number of constraints generated which can
be a significant saving in terms of problem size but also saves significant time when
used in the string solver.1 parent d8b25f3 commit 40ff71b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
0 commit comments