Extend assignment \a x
| 278 | } |
| 279 | /// Extend assignment \a x |
| 280 | virtual bool extendAssignment(Assignment& x) const { |
| 281 | if (base <= 0.0) return false; |
| 282 | Gecode::FloatVal d = exp(x[0]*log(base)); |
| 283 | if (Gecode::Float::subset(d, dom)) { |
| 284 | x.set(1, d); |
| 285 | return true; |
| 286 | } else { |
| 287 | return false; |
| 288 | } |
| 289 | } |
| 290 | /// Post constraint on \a x |
| 291 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 292 | Gecode::pow(home, base, x[0], x[1]); |