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

Function post_neg_unit

gecode/int/linear/bool-post.cpp:254–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252 }
253
254 forceinline void
255 post_neg_unit(Home home,
256 Term<BoolView>* t_n, int n_n,
257 IntRelType irt, IntView y, int c) {
258 switch (irt) {
259 case IRT_EQ:
260 {
261 ViewArray<BoolView> x(home,n_n);
262 for (int i=0; i<n_n; i++)
263 x[i]=t_n[i].x;
264 MinusView z(y);
265 GECODE_ES_FAIL((EqBoolView<BoolView,MinusView>
266 ::post(home,x,z,-c)));
267 }
268 break;
269 case IRT_NQ:
270 {
271 ViewArray<BoolView> x(home,n_n);
272 for (int i=0; i<n_n; i++)
273 x[i]=t_n[i].x;
274 MinusView z(y);
275 GECODE_ES_FAIL((NqBoolView<BoolView,MinusView>
276 ::post(home,x,z,-c)));
277 }
278 break;
279 case IRT_GQ:
280 {
281 ViewArray<NegBoolView> x(home,n_n);
282 for (int i=0; i<n_n; i++)
283 x[i]=NegBoolView(t_n[i].x);
284 GECODE_ES_FAIL((GqBoolView<NegBoolView,IntView>
285 ::post(home,x,y,n_n+c)));
286 }
287 break;
288 case IRT_LQ:
289 {
290 ViewArray<BoolView> x(home,n_n);
291 for (int i=0; i<n_n; i++)
292 x[i]=t_n[i].x;
293 MinusView z(y);
294 GECODE_ES_FAIL((GqBoolView<BoolView,MinusView>
295 ::post(home,x,z,-c)));
296 }
297 break;
298 default: GECODE_NEVER;
299 }
300 }
301
302 forceinline void
303 post_neg_unit(Home home,

Callers 2

post_allFunction · 0.85
postFunction · 0.85

Calls 4

NegBoolViewClass · 0.85
postFunction · 0.70
modeMethod · 0.45
varMethod · 0.45

Tested by

no test coverage detected