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

Method post

test/int/bool.cpp:390–399  ·  view source on GitHub ↗

Post constraint

Source from the content-addressed store, hash-verified

388 }
389 /// Post constraint
390 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
391 using namespace Gecode;
392 int n = x.size() / 2;
393 BoolVarArgs a(2*n), b(2*n);
394 for (int i=n; i--; ) {
395 a[i]=b[i+n]=channel(home,x[i]);
396 b[i]=a[i+n]=channel(home,x[i+n]);
397 }
398 clause(home, op, a, b, a[0]);
399 }
400 };
401
402 /// %Test for Clause Boolean operation with constant

Callers

nothing calls this directly

Calls 3

clauseFunction · 0.85
channelFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected