Post constraint on \a x
| 242 | } |
| 243 | /// Post constraint on \a x |
| 244 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 245 | if (flip()) |
| 246 | Gecode::sqr(home, x[0], x[1]); |
| 247 | else |
| 248 | Gecode::rel(home, sqr(x[0]) == x[1]); |
| 249 | } |
| 250 | }; |
| 251 | |
| 252 | /// %Test for squaring constraint where solution is ensured |