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

Function pairWithOffsets

gecode/int/element.cpp:299–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297 }
298
299 IntVar
300 pairWithOffsets(Home home, IntVar x, int xoff, int w, IntVar y, int yoff, int h) {
301 IntVar xy(home,0,w*h-1);
302 if (xoff==0 && yoff==0) {
303 if (Int::Element::Pair::post(home,x,y,xy,w,h) != ES_OK)
304 home.fail();
305 } else {
306 Int::OffsetView xo(x,xoff);
307 Int::OffsetView yo(y,yoff);
308 if (Int::Element::PairWithOffsets::post(home,xo,yo,xy,w,h) != ES_OK)
309 home.fail();
310 }
311 return xy;
312 }
313 }
314
315 void

Callers 1

elementFunction · 0.85

Calls 2

postFunction · 0.50
failMethod · 0.45

Tested by

no test coverage detected