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

Method post

test/int/bool.cpp:327–336  ·  view source on GitHub ↗

Post constraint

Source from the content-addressed store, hash-verified

325 }
326 /// Post constraint
327 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
328 using namespace Gecode;
329 int n = (x.size()-1) / 2;
330 BoolVarArgs a(n), b(n);
331 for (int i=n; i--; ) {
332 a[i]=channel(home,x[i]);
333 b[i]=channel(home,x[i+n]);
334 }
335 clause(home, op, a, b, channel(home,x[x.size()-1]));
336 }
337 };
338
339 /// %Test for Clause Boolean operation

Callers

nothing calls this directly

Calls 3

clauseFunction · 0.85
channelFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected