MCPcopy Create free account
hub / github.com/Gecode/gecode / ExecStatus prop_mult_plus_bnd

Function ExecStatus prop_mult_plus_bnd

gecode/int/arithmetic/mult.hpp:177–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 */
176 template<class VA, class VB, class VC>
177 forceinline ExecStatus
178 prop_mult_plus_bnd(Space& home, Propagator& p, VA x0, VB x1, VC x2) {
179 assert(pos(x0) && pos(x1) && pos(x2));
180 bool mod;
181 do {
182 mod = false;
183 {
184 ModEvent me = x2.lq(home,mll(x0.max(),x1.max()));
185 if (me_failed(me)) return ES_FAILED;
186 mod |= me_modified(me);
187 }
188 {
189 ModEvent me = x2.gq(home,mll(x0.min(),x1.min()));
190 if (me_failed(me)) return ES_FAILED;
191 mod |= me_modified(me);
192 }
193 {
194 ModEvent me = x0.lq(home,floor_div_pp(x2.max(),x1.min()));
195 if (me_failed(me)) return ES_FAILED;
196 mod |= me_modified(me);
197 }
198 {
199 ModEvent me = x0.gq(home,ceil_div_pp(x2.min(),x1.max()));
200 if (me_failed(me)) return ES_FAILED;
201 mod |= me_modified(me);
202 }
203 {
204 ModEvent me = x1.lq(home,floor_div_pp(x2.max(),x0.min()));
205 if (me_failed(me)) return ES_FAILED;
206 mod |= me_modified(me);
207 }
208 {
209 ModEvent me = x1.gq(home,ceil_div_pp(x2.min(),x0.max()));
210 if (me_failed(me)) return ES_FAILED;
211 mod |= me_modified(me);
212 }
213 } while (mod);
214 return x0.assigned() && x1.assigned() ?
215 home.ES_SUBSUMED(p) : ES_FIX;
216 }
217
218 template<class VA, class VB, class VC>
219 forceinline

Callers

nothing calls this directly

Calls 12

mllFunction · 0.85
me_failedFunction · 0.85
me_modifiedFunction · 0.85
floor_div_ppFunction · 0.85
ceil_div_ppFunction · 0.85
ES_SUBSUMEDMethod · 0.80
posFunction · 0.70
lqMethod · 0.45
maxMethod · 0.45
gqMethod · 0.45
minMethod · 0.45
assignedMethod · 0.45

Tested by

no test coverage detected