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

Function narrow_domy

gecode/int/sorted/narrowing.hpp:221–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220 template<class View>
221 inline bool
222 narrow_domy(Space& home,
223 ViewArray<View>& x, ViewArray<View>& y,
224 int phi[], int phiprime[], bool& nofix) {
225 for (int i=x.size(); i--; ) {
226 ModEvent me_lb = y[i].gq(home, x[phiprime[i]].min());
227 if (me_failed(me_lb)) {
228 return false;
229 }
230 nofix |= (me_modified(me_lb) &&
231 x[phiprime[i]].min() != y[i].min());
232
233 ModEvent me_ub = y[i].lq(home, x[phi[i]].max());
234 if (me_failed(me_ub)) {
235 return false;
236 }
237 nofix |= (me_modified(me_ub) &&
238 x[phi[i]].max() != y[i].max());
239 }
240 return true;
241 }
242
243}}}
244

Callers 1

bounds_propagationFunction · 0.85

Calls 7

me_failedFunction · 0.85
me_modifiedFunction · 0.85
sizeMethod · 0.45
gqMethod · 0.45
minMethod · 0.45
lqMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected