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

Method post

test/int/extensional.cpp:266–274  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

264 }
265 /// Post constraint on \a x
266 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
267 using namespace Gecode;
268 Gecode::BoolVarArgs y(8);
269 for (int i=0; i<4; i++)
270 y[i]=y[i+4]=channel(home,x[i]);
271 unshare(home,y);
272 extensional(home,y,
273 ((REG(0) | REG(1)) + REG(1) + REG(0) + REG(1))(2,2));
274 }
275 };
276
277 /// %Test with simple regular expression and shared variables (uses unsharing)

Callers

nothing calls this directly

Calls 3

unshareFunction · 0.85
channelFunction · 0.50
extensionalFunction · 0.50

Tested by

no test coverage detected