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

Method post

test/int/circuit.cpp:78–87  ·  view source on GitHub ↗

Post circuit constraint on \a x

Source from the content-addressed store, hash-verified

76 }
77 /// Post circuit constraint on \a x
78 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
79 if (offset > 0) {
80 Gecode::IntVarArgs xx(x.size());
81 for (int i=x.size(); i--;)
82 xx[i] = Gecode::expr(home, x[i]+offset);
83 Gecode::circuit(home, offset, xx, ipl);
84 } else {
85 Gecode::circuit(home, x, ipl);
86 }
87 }
88 };
89
90 /// Simple test for Hamiltonian path constraint

Callers

nothing calls this directly

Calls 3

circuitFunction · 0.85
exprFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected