Post constraint
| 388 | } |
| 389 | /// Post constraint |
| 390 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 391 | using namespace Gecode; |
| 392 | int n = x.size() / 2; |
| 393 | BoolVarArgs a(2*n), b(2*n); |
| 394 | for (int i=n; i--; ) { |
| 395 | a[i]=b[i+n]=channel(home,x[i]); |
| 396 | b[i]=a[i+n]=channel(home,x[i+n]); |
| 397 | } |
| 398 | clause(home, op, a, b, a[0]); |
| 399 | } |
| 400 | }; |
| 401 | |
| 402 | /// %Test for Clause Boolean operation with constant |