Post constraint on \a x
| 360 | } |
| 361 | /// Post constraint on \a x |
| 362 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 363 | using namespace Gecode; |
| 364 | if (n > 4) |
| 365 | nroot(home, x[0], n, x[1], ipl); |
| 366 | else |
| 367 | rel(home, expr(home, nroot(x[0],n), ipl), IRT_EQ, x[1], ipl); |
| 368 | } |
| 369 | }; |
| 370 | |
| 371 | /// %Test for nroot constraint with shared variables |