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

Method post

test/int/bool.cpp:363–372  ·  view source on GitHub ↗

Post constraint

Source from the content-addressed store, hash-verified

361 }
362 /// Post constraint
363 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
364 using namespace Gecode;
365 int n = x.size() / 2;
366 BoolVarArgs a(2*n), b(2*n);
367 for (int i=n; i--; ) {
368 a[i]=a[i+n]=channel(home,x[i]);
369 b[i]=b[i+n]=channel(home,x[i+n]);
370 }
371 clause(home, op, a, b, a[0]);
372 }
373 };
374
375 /// %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