Post constraint on \a x
| 176 | } |
| 177 | /// Post constraint on \a x |
| 178 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 179 | Gecode::BoolVarArgs y(x.size()); |
| 180 | for (int i=x.size(); i--; ) |
| 181 | y[i]=Gecode::channel(home,x[i]); |
| 182 | if (one(a)) |
| 183 | Gecode::linear(home, y, irt, c, Gecode::IPL_DEF); |
| 184 | else |
| 185 | Gecode::linear(home, a, y, irt, c, Gecode::IPL_DEF); |
| 186 | } |
| 187 | /// Post reified constraint on \a x for \a r |
| 188 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x, |
| 189 | Gecode::Reify r) { |