Extend assignment \a x
| 142 | } |
| 143 | /// Extend assignment \a x |
| 144 | virtual bool extendAssignment(Assignment& x) const { |
| 145 | if (x[0].max() < 0.0) return false; |
| 146 | Gecode::FloatVal d = log(x[0]); |
| 147 | if (Gecode::Float::subset(d, dom)) { |
| 148 | x.set(1, d); |
| 149 | return true; |
| 150 | } else { |
| 151 | return false; |
| 152 | } |
| 153 | } |
| 154 | /// Post constraint on \a x |
| 155 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 156 | Gecode::log(home, x[0], x[1]); |