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

Method post

test/int/linear.cpp:178–186  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

176 }
177 /// Post constraint on \a x
178 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
179 Gecode::BoolVarArgs y(x.size());
180 for (int i=x.size(); i--; )
181 y[i]=Gecode::channel(home,x[i]);
182 if (one(a))
183 Gecode::linear(home, y, irt, c, Gecode::IPL_DEF);
184 else
185 Gecode::linear(home, a, y, irt, c, Gecode::IPL_DEF);
186 }
187 /// Post reified constraint on \a x for \a r
188 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x,
189 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