Summary
Describes a “sandwich” constraint that does not imply uniqueness of all digits. The digits
LittleSandwichConstraint.Digit1
and
LittleSandwichConstraint.Digit2 must occur exactly once each (in any order) and form the edges of the sandwich. The
numbers sandwiched between them must sum up to
LittleSandwichConstraint.Sum.
Remarks
Warning: This constraint is very memory-intensive. It is implemented as a
CombinationsConstraint
with all of the possible number combinations for the specified set of cells. Avoid using this on oversized
puzzles.
Constructors
LittleSandwichConstraint(IEnumerable<int> affectedCells, int sum, int digit1 = 1, int digit2 = 9, int minValue = 1, int maxValue = 9) |
Constructor. |
Instance methods
| ConstraintResult | | Refer to the documentation for Constraint.Process. |
| string | | Refer to the documentation for object.ToString. |
Instance properties