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

Method post

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

Post constraint on \a x

Source from the content-addressed store, hash-verified

212 }
213 /// Post constraint on \a x
214 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
215 Gecode::IntVarArgs y(4);
216 for (int i=0; i<4; i++)
217 y[i]=x[i];
218 switch (irt) {
219 case Gecode::IRT_EQ:
220 Gecode::exactly(home,y,ints,2); break;
221 case Gecode::IRT_LQ:
222 Gecode::atmost(home,y,ints,2); break;
223 case Gecode::IRT_GQ:
224 Gecode::atleast(home,y,ints,2); break;
225 default: GECODE_NEVER;
226 }
227 }
228 };
229
230 /// %Test number of several equal integers equal to integer variable

Callers

nothing calls this directly

Calls 3

exactlyFunction · 0.85
atmostFunction · 0.85
atleastFunction · 0.85

Tested by

no test coverage detected