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

Method propagate

gecode/float/arithmetic/min-max.hpp:77–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75
76 template<class A, class B, class C>
77 ExecStatus
78 Min<A,B,C>::propagate(Space& home, const ModEventDelta&) {
79 GECODE_ME_CHECK(x2.eq(home,min(x0.domain(),x1.domain())));
80 GECODE_ME_CHECK(x0.gq(home,x2.min()));
81 GECODE_ME_CHECK(x1.gq(home,x2.min()));
82 if (x0 == x1) {
83 GECODE_ME_CHECK(x0.lq(home,x2.max()));
84 } else {
85 if (!overlap(x1.val(),x2.val())) GECODE_ME_CHECK(x0.lq(home,x2.max()));
86 if (!overlap(x0.val(),x2.val())) GECODE_ME_CHECK(x1.lq(home,x2.max()));
87 }
88 return (x0.assigned() && x1.assigned()) ? home.ES_SUBSUMED(*this) : ES_FIX;
89 }
90
91 /*
92 * Bounds consistent max propagator

Callers

nothing calls this directly

Calls 12

ES_SUBSUMEDMethod · 0.80
minFunction · 0.50
overlapFunction · 0.50
maxFunction · 0.50
eqMethod · 0.45
domainMethod · 0.45
gqMethod · 0.45
minMethod · 0.45
lqMethod · 0.45
maxMethod · 0.45
valMethod · 0.45
assignedMethod · 0.45

Tested by

no test coverage detected