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

Method post

test/int/arithmetic.cpp:972–978  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

970 }
971 /// Post constraint on \a x
972 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
973 int n=x.size()-1;
974 Gecode::BoolVarArgs m(2*n);
975 for (int i=0; i<n; i++)
976 m[2*i+0]=m[2*i+1]=channel(home,x[i]);
977 Gecode::argmax(home, m, x[n], tiebreak);
978 }
979 };
980
981 /// %Test for argument minimum constraint

Callers

nothing calls this directly

Calls 3

argmaxFunction · 0.85
channelFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected