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