Post constraint
| 426 | } |
| 427 | /// Post constraint |
| 428 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 429 | using namespace Gecode; |
| 430 | int n = x.size() / 2; |
| 431 | BoolVarArgs a(n), b(n); |
| 432 | for (int i=n; i--; ) { |
| 433 | a[i]=channel(home,x[i]); |
| 434 | b[i]=channel(home,x[i+n]); |
| 435 | } |
| 436 | clause(home, op, a, b, c); |
| 437 | } |
| 438 | }; |
| 439 | |
| 440 | /// %Test for if-then-else-constraint |