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

Method post

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

Post constraint on \a x

Source from the content-addressed store, hash-verified

141 }
142 /// Post constraint on \a x
143 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
144 Gecode::IntVarArgs y(3);
145 for (int i=0; i<3; i++)
146 y[i]=x[i];
147 switch (irt) {
148 case Gecode::IRT_EQ:
149 Gecode::exactly(home,y,x[3],x[4]); break;
150 case Gecode::IRT_LQ:
151 Gecode::atmost(home,y,x[3],x[4]); break;
152 case Gecode::IRT_GQ:
153 Gecode::atleast(home,y,x[3],x[4]); break;
154 default: GECODE_NEVER;
155 }
156 }
157 };
158
159 /// %Test number of equal variables equal to integer

Callers

nothing calls this directly

Calls 3

exactlyFunction · 0.85
atmostFunction · 0.85
atleastFunction · 0.85

Tested by

no test coverage detected