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