Post constraint on \a x
| 234 | } |
| 235 | /// Post constraint on \a x |
| 236 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 237 | int n=x.size()-1; |
| 238 | Gecode::BoolVarArgs y(n); |
| 239 | for (int i=n; i--; ) |
| 240 | y[i]=Gecode::channel(home,x[i]); |
| 241 | if (one(a)) |
| 242 | Gecode::linear(home, y, irt, x[n]); |
| 243 | else |
| 244 | Gecode::linear(home, a, y, irt, x[n]); |
| 245 | } |
| 246 | /// Post reified constraint on \a x for \a r |
| 247 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x, |
| 248 | Gecode::Reify r) { |