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

Method post

test/int/unshare.cpp:84–93  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

82 }
83 /// Post constraint on \a x
84 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
85 using namespace Gecode;
86 BoolVarArgs y(6);
87 y[0]=channel(home,x[0]);
88 y[1]=y[3]=channel(home,x[1]);
89 y[2]=y[4]=y[5]=channel(home,x[2]);
90 unshare(home, y);
91 for (int i=0; i<6; i++)
92 rel(home, y[i], IRT_EQ, channel(home,x[3+i]));
93 }
94 };
95
96 /// %Test for unsharing in failed spaces

Callers

nothing calls this directly

Calls 3

unshareFunction · 0.85
channelFunction · 0.50
relFunction · 0.50

Tested by

no test coverage detected