Convenient way to make IntSetArgs
| 1307 | #ifdef GECODE_HAS_SET_VARS |
| 1308 | /// Convenient way to make IntSetArgs |
| 1309 | IntSetArgs ISA(int n, ...) { |
| 1310 | IntSetArgs sets; |
| 1311 | va_list args; |
| 1312 | va_start(args, n); |
| 1313 | int i = 0; |
| 1314 | IntArgs a; |
| 1315 | while (i < n) { |
| 1316 | int x = va_arg(args,int); |
| 1317 | if (x == -1) { |
| 1318 | i++; |
| 1319 | sets << IntSet(a); |
| 1320 | a = IntArgs(); |
| 1321 | } else { |
| 1322 | a << x; |
| 1323 | } |
| 1324 | } |
| 1325 | va_end(args); |
| 1326 | return sets; |
| 1327 | } |
| 1328 | |
| 1329 | /// %Test for set variable symmetry |
| 1330 | class SetVarSym1 { |
no test coverage detected