Extend assignment \a x
| 332 | } |
| 333 | /// Extend assignment \a x |
| 334 | virtual bool extendAssignment(Assignment& x) const { |
| 335 | Gecode::FloatVal d = sqrt(abs(x[0])); |
| 336 | if (Gecode::Float::subset(d, dom)) { |
| 337 | x.set(1, d); |
| 338 | return true; |
| 339 | } else { |
| 340 | return false; |
| 341 | } |
| 342 | } |
| 343 | /// Post constraint on \a x |
| 344 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 345 | Gecode::sqrt(home, x[0], x[1]); |