| 1140 | public: |
| 1141 | IntVarArray xs; |
| 1142 | Latin(int n = 4) : xs(*this, n*n, 1, n) |
| 1143 | { |
| 1144 | Matrix<IntVarArray> m(xs, n, n); |
| 1145 | for (int i = 0 ; i < n ; i++) { |
| 1146 | distinct(*this, m.col(i)); |
| 1147 | distinct(*this, m.row(i)); |
| 1148 | } |
| 1149 | Symmetries s; |
| 1150 | s << rows_interchange(m); |
| 1151 | s << columns_interchange(m); |
| 1152 | s << ValueSymmetry(IntSet(1,n)); |
| 1153 | branch(*this, xs, INT_VAR_NONE(), INT_VAL_MIN(), s); |
| 1154 | } |
| 1155 | // Search support. |
| 1156 | Latin(Latin& s) : Space(s) |
| 1157 | { xs.update(*this, s.xs); } |
nothing calls this directly
no test coverage detected