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

Function post_mixed

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

Source from the content-addressed store, hash-verified

440 }
441
442 forceinline void
443 post_mixed(Home home,
444 Term<BoolView>* t_p, int n_p,
445 Term<BoolView>* t_n, int n_n,
446 IntRelType irt, IntView y, int c) {
447 ScaleBoolArray b_p(home,n_p);
448 {
449 ScaleBool* f=b_p.fst();
450 for (int i=0; i<n_p; i++) {
451 f[i].x=t_p[i].x; f[i].a=t_p[i].a;
452 }
453 }
454 ScaleBoolArray b_n(home,n_n);
455 {
456 ScaleBool* f=b_n.fst();
457 for (int i=0; i<n_n; i++) {
458 f[i].x=t_n[i].x; f[i].a=t_n[i].a;
459 }
460 }
461 switch (irt) {
462 case IRT_EQ:
463 GECODE_ES_FAIL((EqBoolScale<ScaleBoolArray,ScaleBoolArray,IntView>
464 ::post(home,b_p,b_n,y,c)));
465 break;
466 case IRT_NQ:
467 GECODE_ES_FAIL((NqBoolScale<ScaleBoolArray,ScaleBoolArray,IntView>
468 ::post(home,b_p,b_n,y,c)));
469 break;
470 case IRT_LQ:
471 GECODE_ES_FAIL((LqBoolScale<ScaleBoolArray,ScaleBoolArray,IntView>
472 ::post(home,b_p,b_n,y,c)));
473 break;
474 case IRT_GQ:
475 {
476 MinusView m(y);
477 GECODE_ES_FAIL((LqBoolScale<ScaleBoolArray,ScaleBoolArray,MinusView>
478 ::post(home,b_n,b_p,m,-c)));
479 }
480 break;
481 default:
482 GECODE_NEVER;
483 }
484 }
485
486
487 forceinline void

Callers 1

post_allFunction · 0.85

Calls 2

postFunction · 0.70
fstMethod · 0.45

Tested by

no test coverage detected