MCPcopy Create free account
hub / github.com/Gecode/gecode / commit

Method commit

examples/queen-armies.cpp:230–238  ·  view source on GitHub ↗

\brief Perform commit for choice \a _c and * alternative \a a. */

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 3

me_failedFunction · 0.85
BoolViewClass · 0.50
eqMethod · 0.45

Tested by

no test coverage detected