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

Method post

test/int/mm-count.cpp:177–190  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

175 }
176 /// Post constraint on \a x
177 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
178 Gecode::IntVarArgs y(3);
179 for (int i=0; i<3; i++)
180 y[i]=x[i];
181 switch (irt) {
182 case Gecode::IRT_EQ:
183 Gecode::exactly(home,y,x[3],2); break;
184 case Gecode::IRT_LQ:
185 Gecode::atmost(home,y,x[3],2); break;
186 case Gecode::IRT_GQ:
187 Gecode::atleast(home,y,x[3],2); break;
188 default: GECODE_NEVER;
189 }
190 }
191 };
192
193 Gecode::IntArgs ints({1,0,3,2});

Callers

nothing calls this directly

Calls 3

exactlyFunction · 0.85
atmostFunction · 0.85
atleastFunction · 0.85

Tested by

no test coverage detected