diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-04-20 15:32:10 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-04-20 18:39:35 +0100 |
| commit | 14e1e05510ac02a5502823bafe46d98c6fab3e5c (patch) | |
| tree | d7e99ac9bb574bc62a324cf3bb435b485c1113b3 /divvy.c | |
| parent | 088fdeee38599b1711ba8766d36c652f1355e36e (diff) | |
| download | puzzles-14e1e05510ac02a5502823bafe46d98c6fab3e5c.zip puzzles-14e1e05510ac02a5502823bafe46d98c6fab3e5c.tar.gz puzzles-14e1e05510ac02a5502823bafe46d98c6fab3e5c.tar.bz2 puzzles-14e1e05510ac02a5502823bafe46d98c6fab3e5c.tar.xz | |
Introduce a new dsf_equivalent() function.
Not very interesting, but the idiom for checking equivalence via two
calls to dsf_canonify is cumbersome enough to be worth abbreviating.
Diffstat (limited to 'divvy.c')
| -rw-r--r-- | divvy.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -632,7 +632,7 @@ DSF *divvy_rectangle_attempt(int w, int h, int k, random_state *rs) dsf_merge(tmpdsf, y*w+x, (y+1)*w+x); for (i = 0; i < wh; i++) { j = dsf_canonify(retdsf, i); - assert(dsf_canonify(tmpdsf, j) == dsf_canonify(tmpdsf, i)); + assert(dsf_equivalent(tmpdsf, j, i)); } cleanup: |