\brief Perform commit for choice \a _c and * alternative \a a. */
| 228 | * alternative \a a. |
| 229 | */ |
| 230 | virtual ExecStatus commit(Space& home, const Gecode::Choice& _c, |
| 231 | unsigned int a) { |
| 232 | QueenArmies& q = static_cast<QueenArmies&>(home); |
| 233 | const Choice& c = static_cast<const Choice&>(_c); |
| 234 | bool val = (a == 0) ? c.val : !c.val; |
| 235 | return me_failed(Int::BoolView(q.w[c.pos]).eq(q, val)) |
| 236 | ? ES_FAILED |
| 237 | : ES_OK; |
| 238 | } |
| 239 | /// Print explanation |
| 240 | virtual void print(const Space&, const Gecode::Choice& _c, |
| 241 | unsigned int a, |