Extend assignment \a x
| 261 | } |
| 262 | /// Extend assignment \a x |
| 263 | virtual bool extendAssignment(Assignment& x) const { |
| 264 | Gecode::FloatVal d = sqr(x[0]); |
| 265 | if (Gecode::Float::subset(d, dom)) { |
| 266 | x.set(1, d); |
| 267 | return true; |
| 268 | } else { |
| 269 | return false; |
| 270 | } |
| 271 | } |
| 272 | /// Post constraint on \a x |
| 273 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 274 | Gecode::sqr(home, x[0], x[1]); |