Setup problem constraints and symmetries
| 794 | static const int u = 8; |
| 795 | /// Setup problem constraints and symmetries |
| 796 | static void setup(Home home, IntVarArray& xs) { |
| 797 | TupleSet tuples(3); |
| 798 | tuples.add({1,1,1}).add({4,4,4}).add({7,7,7}) |
| 799 | .add({0,1,5}).add({0,1,8}).add({3,4,2}) |
| 800 | .add({3,4,8}).add({6,7,2}).add({6,7,5}) |
| 801 | .finalize(); |
| 802 | extensional(home, xs, tuples); |
| 803 | |
| 804 | // Values 0,1,2 are symmetric with 3,4,5, and with 6,7,8. |
| 805 | IntArgs values({0,1,2, 3,4,5, 6,7,8}); |
| 806 | Symmetries s; |
| 807 | s << ValueSequenceSymmetry(values, 3); |
| 808 | branch(home, xs, INT_VAR_NONE(), INT_VAL_MIN(), s); |
| 809 | } |
| 810 | /// Compute list of expected solutions |
| 811 | static std::vector<IntArgs> expectedSolutions(void) { |
| 812 | static std::vector<IntArgs> expected; |
nothing calls this directly
no test coverage detected