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

Method post

test/int/arithmetic.cpp:814–820  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

812 }
813 /// Post constraint on \a x
814 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
815 int n=x.size()-1;
816 Gecode::IntVarArgs m(2*n);
817 for (int i=0; i<n; i++)
818 m[2*i+0]=m[2*i+1]=x[i];
819 Gecode::argmax(home, m, x[n], tiebreak);
820 }
821 };
822
823 /// %Test for argument minimum constraint

Callers

nothing calls this directly

Calls 2

argmaxFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected