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

Method post

test/set/construct.cpp:184–214  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

182 }
183 /// Post constraint on \a x
184 virtual void post(Space& home, SetVarArray&, IntVarArray&) {
185 // Check non-empty lower, empty upper bound
186 con(home, 1,1, 1,0);
187 con(home, IntSet(1,1), 1,0);
188 con(home, 1,1, IntSet(1,0));
189 con(home, IntSet(1,1), IntSet(1,0));
190
191 // Check min cardinality
192 con(home, 1,0, 1,1, 2,3);
193 con(home, IntSet(1,0), 1,1, 2U,3U);
194 con(home, 1,0, IntSet(1,1), 2U,3U);
195 con(home, IntSet(1,0), IntSet(1,1), 2U,3U);
196
197 // Check max cardinality
198 con(home, 1,3, 1,4, 0,2);
199 con(home, IntSet(1,3), 1,4, 0U,2U);
200 con(home, 1,3, IntSet(1,4), 0U,2U);
201 con(home, IntSet(1,3), IntSet(1,4), 0U,2U);
202
203 // Check non-subset bounds
204 con(home, 1,3, 2,4);
205 con(home, IntSet(1,3), 2,4);
206 con(home, 1,3, IntSet(2,4));
207 con(home, IntSet(1,3), IntSet(2,4));
208 con(home, 1,4, 1,3);
209 con(home, IntSet(1,4), 1,3);
210 con(home, 1,4, IntSet(1,3));
211 con(home, IntSet(1,4), IntSet(1,3));
212
213 con(home, IntSet::empty, 2, 4, 0U, 10U, false);
214 }
215 };
216 Construct _con;
217

Callers

nothing calls this directly

Calls 1

IntSetClass · 0.85

Tested by

no test coverage detected