Post constraint
| 361 | } |
| 362 | /// Post constraint |
| 363 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 364 | using namespace Gecode; |
| 365 | int n = x.size() / 2; |
| 366 | BoolVarArgs a(2*n), b(2*n); |
| 367 | for (int i=n; i--; ) { |
| 368 | a[i]=a[i+n]=channel(home,x[i]); |
| 369 | b[i]=b[i+n]=channel(home,x[i+n]); |
| 370 | } |
| 371 | clause(home, op, a, b, a[0]); |
| 372 | } |
| 373 | }; |
| 374 | |
| 375 | /// %Test for Clause Boolean operation |