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

Method commit

examples/steel-mill.cpp:430–440  ·  view source on GitHub ↗

Perform commit for choice \a _c and alternative \a a

Source from the content-addressed store, hash-verified

428 }
429 /// Perform commit for choice \a _c and alternative \a a
430 virtual ExecStatus commit(Space& home, const Gecode::Choice& _c,
431 unsigned int a) {
432 SteelMill& sm = static_cast<SteelMill&>(home);
433 const Choice& c = static_cast<const Choice&>(_c);
434 if (a)
435 return me_failed(Int::IntView(sm.slab[c.pos]).nq(home, c.val))
436 ? ES_FAILED : ES_OK;
437 else
438 return me_failed(Int::IntView(sm.slab[c.pos]).eq(home, c.val))
439 ? ES_FAILED : ES_OK;
440 }
441 /// Print explanation
442 virtual void print(const Space&, const Gecode::Choice& _c,
443 unsigned int a,

Callers

nothing calls this directly

Calls 4

me_failedFunction · 0.85
IntViewClass · 0.50
nqMethod · 0.45
eqMethod · 0.45

Tested by

no test coverage detected