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

Method commit

examples/knights.cpp:126–133  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

124 }
125 /// Perform commit for choice \a _c and alternative \a a
126 virtual ExecStatus commit(Space& home, const Gecode::Choice& _c,
127 unsigned int a) {
128 const Choice& c = static_cast<const Choice&>(_c);
129 if (a == 0)
130 return me_failed(x[c.pos].eq(home, c.val)) ? ES_FAILED : ES_OK;
131 else
132 return me_failed(x[c.pos].nq(home, c.val)) ? ES_FAILED : ES_OK;
133 }
134 /// Print explanation
135 virtual void print(const Space&, const Gecode::Choice& _c,
136 unsigned int a,

Callers

nothing calls this directly

Calls 3

me_failedFunction · 0.85
eqMethod · 0.45
nqMethod · 0.45

Tested by

no test coverage detected