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

Method post

gecode/int/channel/val.hpp:229–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227
228 template<class View, class Offset, bool shared>
229 ExecStatus
230 Val<View,Offset,shared>::post(Home home, int n, ValInfo<View>* xy,
231 Offset& ox, Offset& oy) {
232 assert(n > 0);
233 if (n == 1) {
234 GECODE_ME_CHECK(ox(xy[0].view).eq(home,0));
235 GECODE_ME_CHECK(oy(xy[1].view).eq(home,0));
236 return ES_OK;
237 }
238 for (int i=0; i<n; i++) {
239 GECODE_ME_CHECK(ox(xy[i ].view).gq(home,0));
240 GECODE_ME_CHECK(ox(xy[i ].view).le(home,n));
241 GECODE_ME_CHECK(oy(xy[i+n].view).gq(home,0));
242 GECODE_ME_CHECK(oy(xy[i+n].view).le(home,n));
243 }
244 (void) new (home) Val<View,Offset,shared>(home,n,xy,ox,oy);
245 return ES_OK;
246 }
247
248}}}
249

Callers

nothing calls this directly

Calls 3

eqMethod · 0.45
gqMethod · 0.45
leMethod · 0.45

Tested by

no test coverage detected