example/sudoku-set.rb in gecoder-0.8.0 vs example/sudoku-set.rb in gecoder-0.8.1
- old
+ new
@@ -59,12 +59,9 @@
n.times do |i|
(i + 1).upto(n - 1) do |j|
@sets[i].must_be.disjoint_with @sets[j]
end
end
- # The above implies that the sets must be distinct (since cardinality 0 is
- # not allowed), but we also explicitly add the distinctness constraint.
- @sets.must_be.distinct(:size => n)
# The sets must intersect in exactly one element with each row column and
# block. I.e. an assignable number must be assigned exactly once in each
# row, column and block. We specify the constraint by expressing that the
# intersection must be equal with a set variable with cardinality 1.
\ No newline at end of file