Post constraint
| 325 | } |
| 326 | /// Post constraint |
| 327 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 328 | using namespace Gecode; |
| 329 | int n = (x.size()-1) / 2; |
| 330 | BoolVarArgs a(n), b(n); |
| 331 | for (int i=n; i--; ) { |
| 332 | a[i]=channel(home,x[i]); |
| 333 | b[i]=channel(home,x[i+n]); |
| 334 | } |
| 335 | clause(home, op, a, b, channel(home,x[x.size()-1])); |
| 336 | } |
| 337 | }; |
| 338 | |
| 339 | /// %Test for Clause Boolean operation |