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

Method post

test/int/extensional.cpp:215–226  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

213 }
214 /// Post constraint on \a x
215 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
216 using namespace Gecode;
217 IntVarArgs y(8);
218 for (int i=0; i<4; i++)
219 y[i]=y[i+4]=x[i];
220 unshare(home,y);
221 extensional(home, y,
222 ((REG(0) | REG(2)) +
223 (REG(-1) | REG(1)) +
224 (REG(7) | REG(0) | REG(1)) +
225 (REG(0) | REG(1)))(2,2));
226 }
227 };
228
229 /// %Test with simple regular expression and shared variables (uses unsharing)

Callers

nothing calls this directly

Calls 2

unshareFunction · 0.85
extensionalFunction · 0.50

Tested by

no test coverage detected