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

Method post

test/float/linear.cpp:166–175  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

164 }
165 /// Post constraint on \a x
166 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
167 int n = a.size();
168 Gecode::FloatVarArgs y(n);
169 for (int i=n; i--; )
170 y[i] = x[i];
171 if (one(a))
172 Gecode::linear(home, y, frt, x[n]);
173 else
174 Gecode::linear(home, a, y, frt, x[n]);
175 }
176 /// Post reified constraint on \a x for \a r
177 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x,
178 Gecode::Reify r) {

Callers

nothing calls this directly

Calls 3

oneFunction · 0.70
linearFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected