Extend assignment \a x
| 468 | } |
| 469 | /// Extend assignment \a x |
| 470 | virtual bool extendAssignment(Assignment& x) const { |
| 471 | if ((n == 0) || (x[0].max() < 0)) |
| 472 | return false; |
| 473 | Gecode::FloatVal d = nroot(x[0],n); |
| 474 | if (Gecode::Float::subset(d, dom)) { |
| 475 | x.set(1, d); |
| 476 | return true; |
| 477 | } else { |
| 478 | return false; |
| 479 | } |
| 480 | } |
| 481 | /// Post constraint on \a x |
| 482 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 483 | Gecode::nroot(home, x[0], n, x[1]); |