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

Method post

test/int/unary.cpp:127–136  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

125 }
126 /// Post constraint on \a x
127 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
128 int n=x.size() / 2;
129 Gecode::IntVarArgs s(n);
130 Gecode::BoolVarArgs m(n);
131 for (int i=0; i<n; i++) {
132 s[i]=x[i];
133 m[i]=Gecode::expr(home, (x[n+i] > l));
134 }
135 Gecode::unary(home, s, p, m, ipl);
136 }
137 };
138
139 /// %Test for unary constraint

Callers

nothing calls this directly

Calls 3

unaryFunction · 0.85
exprFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected