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

Method propagate

gecode/float/arithmetic/abs.hpp:71–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70 template<class A, class B>
71 ExecStatus
72 Abs<A,B>::propagate(Space& home, const ModEventDelta&) {
73 GECODE_ME_CHECK(x1.eq(home,abs(x0.val())));
74 if (x0.min() >= 0)
75 GECODE_ME_CHECK(x0.eq(home,FloatVal(x1.min(), x1.max())));
76 else if (x0.max() <= 0)
77 GECODE_ME_CHECK(x0.eq(home,FloatVal(-x1.max(), -x1.min())));
78 else
79 GECODE_ME_CHECK(x0.eq(home,FloatVal(-x1.max(), x1.max())));
80 return (x0.assigned() && x1.assigned()) ? home.ES_SUBSUMED(*this) : ES_FIX;
81 }
82
83}}}
84

Callers

nothing calls this directly

Calls 8

FloatValClass · 0.85
ES_SUBSUMEDMethod · 0.80
absFunction · 0.50
eqMethod · 0.45
valMethod · 0.45
minMethod · 0.45
maxMethod · 0.45
assignedMethod · 0.45

Tested by

no test coverage detected