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

Method assign

test/float.cpp:269–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267 }
268
269 void
270 TestSpace::assign(const Assignment& a, MaybeType& sol, bool skip, Gecode::Support::RandomGenerator& rand) {
271 using namespace Gecode;
272 int i = skip ? static_cast<int>(rand(a.size())) : -1;
273
274 for (int j=a.size(); j--; )
275 if (i != j) {
276 if ((x[j].min() == a[j].max()) || (x[j].max() == a[j].min()))
277 {
278 sol = MT_MAYBE;
279 return;
280 }
281 rel(j, FRT_EQ, a[j]);
282 if (Base::fixpoint(rand) && failed())
283 return;
284 }
285 }
286
287 void
288 TestSpace::bound(Gecode::Support::RandomGenerator& rand) {

Callers 1

runMethod · 0.45

Calls 4

relFunction · 0.50
sizeMethod · 0.45
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected