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

Method gq

gecode/float/var-imp/float.hpp:132–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 */
131
132 forceinline ModEvent
133 FloatVarImp::gq(Space& home, FloatNum n) {
134 if (n > dom.max()) return fail(home);
135 if ((n <= dom.min()) || assigned()) return ME_FLOAT_NONE;
136 FloatDelta d(dom.min(),n);
137 ModEvent me = ME_FLOAT_BND;
138 dom = intersect(dom,FloatVal(n,dom.max()));
139 if (assigned()) me = ME_FLOAT_VAL;
140 GECODE_ASSUME((me == ME_FLOAT_VAL) |
141 (me == ME_FLOAT_BND));
142 return notify(home,me,d);
143 }
144 forceinline ModEvent
145 FloatVarImp::gq(Space& home, const FloatVal& n) {
146 if (n.min() > dom.max()) return fail(home);

Callers

nothing calls this directly

Calls 5

assignedFunction · 0.85
FloatValClass · 0.85
intersectFunction · 0.50
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected