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

Method post

test/int/arithmetic.cpp:1056–1062  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

1054 }
1055 /// Post constraint on \a x
1056 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
1057 int n=x.size()-1;
1058 Gecode::BoolVarArgs m(2*n);
1059 for (int i=0; i<n; i++)
1060 m[2*i+0]=m[2*i+1]=channel(home,x[i]);
1061 Gecode::argmin(home, m, x[n], tiebreak);
1062 }
1063 };
1064
1065 /// Help class to create and register tests

Callers

nothing calls this directly

Calls 3

argminFunction · 0.85
channelFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected