Post constraint on \a x
| 169 | } |
| 170 | /// Post constraint on \a x |
| 171 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 172 | using namespace Gecode; |
| 173 | rel(home, expr(home, sqr(x[0])), IRT_EQ, x[1], IPL_DOM); |
| 174 | } |
| 175 | }; |
| 176 | |
| 177 | /// %Test for sqrt constraint |