Post constraint on \a x
| 246 | } |
| 247 | /// Post constraint on \a x |
| 248 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 249 | using namespace Gecode; |
| 250 | if (n > 4) |
| 251 | pow(home, x[0], n, x[1], ipl); |
| 252 | else |
| 253 | rel(home, expr(home, pow(x[0],n), ipl), IRT_EQ, x[1], ipl); |
| 254 | } |
| 255 | }; |
| 256 | |
| 257 | /// %Test for power constraint with shared variables |