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

Function post_pos_unit

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

Source from the content-addressed store, hash-verified

66 }
67
68 forceinline void
69 post_pos_unit(Home home,
70 Term<BoolView>* t_p, int n_p,
71 IntRelType irt, IntView y, int c) {
72 switch (irt) {
73 case IRT_EQ:
74 {
75 ViewArray<BoolView> x(home,n_p);
76 for (int i=0; i<n_p; i++)
77 x[i]=t_p[i].x;
78 GECODE_ES_FAIL((EqBoolView<BoolView,IntView>
79 ::post(home,x,y,c)));
80 }
81 break;
82 case IRT_NQ:
83 {
84 ViewArray<BoolView> x(home,n_p);
85 for (int i=0; i<n_p; i++)
86 x[i]=t_p[i].x;
87 GECODE_ES_FAIL((NqBoolView<BoolView,IntView>
88 ::post(home,x,y,c)));
89 }
90 break;
91 case IRT_GQ:
92 {
93 ViewArray<BoolView> x(home,n_p);
94 for (int i=0; i<n_p; i++)
95 x[i]=t_p[i].x;
96 GECODE_ES_FAIL((GqBoolView<BoolView,IntView>
97 ::post(home,x,y,c)));
98 }
99 break;
100 case IRT_LQ:
101 {
102 ViewArray<NegBoolView> x(home,n_p);
103 for (int i=0; i<n_p; i++)
104 x[i]=NegBoolView(t_p[i].x);
105 MinusView z(y);
106 GECODE_ES_FAIL((GqBoolView<NegBoolView,MinusView>
107 ::post(home,x,z,n_p-c)));
108 }
109 break;
110 default: GECODE_NEVER;
111 }
112 }
113
114 forceinline void
115 post_pos_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