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

Method post

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

Post constraint on \a x

Source from the content-addressed store, hash-verified

247 }
248 /// Post constraint on \a x
249 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
250 Gecode::IntVarArgs y(4);
251 for (int i=0; i<4; i++)
252 y[i]=x[i];
253 switch (irt) {
254 case Gecode::IRT_EQ:
255 Gecode::exactly(home,y,ints,x[4]); break;
256 case Gecode::IRT_LQ:
257 Gecode::atmost(home,y,ints,x[4]); break;
258 case Gecode::IRT_GQ:
259 Gecode::atleast(home,y,ints,x[4]); break;
260 default: GECODE_NEVER;
261 }
262 }
263 };
264
265 /// Help class to create and register tests

Callers

nothing calls this directly

Calls 3

exactlyFunction · 0.85
atmostFunction · 0.85
atleastFunction · 0.85

Tested by

no test coverage detected