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

Method post

gecode/int/channel/dom.hpp:306–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304
305 template<class View, class Offset, bool shared>
306 ExecStatus
307 Dom<View,Offset,shared>::post(Home home, int n, DomInfo<View,Offset>* xy,
308 Offset& ox, Offset& oy) {
309 assert(n > 0);
310 if (n == 1) {
311 GECODE_ME_CHECK(ox(xy[0].view).eq(home,0));
312 GECODE_ME_CHECK(oy(xy[1].view).eq(home,0));
313 return ES_OK;
314 }
315 for (int i=0; i<n; i++) {
316 GECODE_ME_CHECK(ox(xy[i ].view).gq(home,0));
317 GECODE_ME_CHECK(ox(xy[i ].view).le(home,n));
318 GECODE_ME_CHECK(oy(xy[i+n].view).gq(home,0));
319 GECODE_ME_CHECK(oy(xy[i+n].view).le(home,n));
320 }
321 (void) new (home) Dom<View,Offset,shared>(home,n,xy,ox,oy);
322 return ES_OK;
323 }
324
325}}}
326

Callers

nothing calls this directly

Calls 3

eqMethod · 0.45
gqMethod · 0.45
leMethod · 0.45

Tested by

no test coverage detected