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

Method post

test/int/linear.cpp:127–136  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

125 }
126 /// Post constraint on \a x
127 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
128 int n = a.size();
129 Gecode::IntVarArgs y(n);
130 for (int i=n; i--; )
131 y[i] = x[i];
132 if (one(a))
133 Gecode::linear(home, y, irt, x[n], ipl);
134 else
135 Gecode::linear(home, a, y, irt, x[n], ipl);
136 }
137 /// Post reified constraint on \a x for \a r
138 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x,
139 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