Extend assignment \a x
| 400 | } |
| 401 | /// Extend assignment \a x |
| 402 | virtual bool extendAssignment(Assignment& x) const { |
| 403 | Gecode::FloatVal d = pow(x[0],n); |
| 404 | if (Gecode::Float::subset(d, dom)) { |
| 405 | x.set(1, d); |
| 406 | return true; |
| 407 | } else { |
| 408 | return false; |
| 409 | } |
| 410 | } |
| 411 | /// Post constraint on \a x |
| 412 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 413 | Gecode::pow(home, x[0], n, x[1]); |