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

Method post

gecode/int/channel/link-single.hpp:41–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 (home,x0,x1) {}
40
41 forceinline ExecStatus
42 LinkSingle::post(Home home, BoolView x0, IntView x1) {
43 if (x1.assigned()) {
44 switch (x1.val()) {
45 case 0:
46 GECODE_ME_CHECK(x0.zero(home)); break;
47 case 1:
48 GECODE_ME_CHECK(x0.one(home)); break;
49 default:
50 return ES_FAILED;
51 }
52 } else if (x0.zero()) {
53 GECODE_ME_CHECK(x1.eq(home,0));
54 } else if (x0.one()) {
55 GECODE_ME_CHECK(x1.eq(home,1));
56 } else {
57 GECODE_ME_CHECK(x1.gq(home,0));
58 GECODE_ME_CHECK(x1.lq(home,1));
59 (void) new (home) LinkSingle(home,x0,x1);
60 }
61 return ES_OK;
62 }
63
64}}}
65

Callers

nothing calls this directly

Calls 7

assignedMethod · 0.45
valMethod · 0.45
zeroMethod · 0.45
oneMethod · 0.45
eqMethod · 0.45
gqMethod · 0.45
lqMethod · 0.45

Tested by

no test coverage detected