Post constraint on \a x
| 164 | } |
| 165 | /// Post constraint on \a x |
| 166 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 167 | int n = a.size(); |
| 168 | Gecode::FloatVarArgs y(n); |
| 169 | for (int i=n; i--; ) |
| 170 | y[i] = x[i]; |
| 171 | if (one(a)) |
| 172 | Gecode::linear(home, y, frt, x[n]); |
| 173 | else |
| 174 | Gecode::linear(home, a, y, frt, x[n]); |
| 175 | } |
| 176 | /// Post reified constraint on \a x for \a r |
| 177 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x, |
| 178 | Gecode::Reify r) { |