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

Method post

test/int/arithmetic.cpp:888–894  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

886 }
887 /// Post constraint on \a x
888 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
889 int n=x.size()-1;
890 Gecode::IntVarArgs m(2*n);
891 for (int i=0; i<n; i++)
892 m[2*i+0]=m[2*i+1]=x[i];
893 Gecode::argmin(home, m, x[n], tiebreak);
894 }
895 };
896
897 /// %Test for Boolean argument maximum constraint

Callers

nothing calls this directly

Calls 2

argminFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected