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

Method post

test/int/linear.cpp:236–245  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

234 }
235 /// Post constraint on \a x
236 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
237 int n=x.size()-1;
238 Gecode::BoolVarArgs y(n);
239 for (int i=n; i--; )
240 y[i]=Gecode::channel(home,x[i]);
241 if (one(a))
242 Gecode::linear(home, y, irt, x[n]);
243 else
244 Gecode::linear(home, a, y, irt, x[n]);
245 }
246 /// Post reified constraint on \a x for \a r
247 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x,
248 Gecode::Reify r) {

Callers

nothing calls this directly

Calls 4

oneFunction · 0.70
channelFunction · 0.50
linearFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected