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

Method post

gecode/int/order/propagate.hpp:47–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 }
46
47 forceinline ExecStatus
48 OrderProp::post(Home home, IntView s0, int p0, IntView s1, int p1,
49 BoolView b) {
50 if (s0.max() + p0 <= s1.min()) {
51 GECODE_ME_CHECK(b.zero(home));
52 } else if (s1.max() + p1 <= s0.min()) {
53 GECODE_ME_CHECK(b.one(home));
54 } else if ((s1.min() + p1 > s0.max()) || b.zero()) {
55 GECODE_ME_CHECK(b.zero(home));
56 return Rel::Lq<OffsetView,IntView>::post(home,OffsetView(s0,p0),s1);
57 } else if ((s0.min() + p0 > s1.max()) || b.one()) {
58 GECODE_ME_CHECK(b.one(home));
59 return Rel::Lq<OffsetView,IntView>::post(home,OffsetView(s1,p1),s0);
60 } else {
61 (void) new (home) OrderProp(home,s0,p0,s1,p1,b);
62 }
63 return ES_OK;
64 }
65
66 forceinline
67 OrderProp::OrderProp(Space& home, OrderProp& p)

Callers

nothing calls this directly

Calls 6

postFunction · 0.50
OffsetViewClass · 0.50
maxMethod · 0.45
minMethod · 0.45
zeroMethod · 0.45
oneMethod · 0.45

Tested by

no test coverage detected