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

Method post

test/int/arithmetic.cpp:248–254  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

246 }
247 /// Post constraint on \a x
248 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
249 using namespace Gecode;
250 if (n > 4)
251 pow(home, x[0], n, x[1], ipl);
252 else
253 rel(home, expr(home, pow(x[0],n), ipl), IRT_EQ, x[1], ipl);
254 }
255 };
256
257 /// %Test for power constraint with shared variables

Callers

nothing calls this directly

Calls 3

powFunction · 0.50
relFunction · 0.50
exprFunction · 0.50

Tested by

no test coverage detected