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

Method same

test/set.cpp:373–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371 }
372
373 bool
374 SetTestSpace::same(SetTestSpace& c) {
375 if (opt.log)
376 olog << ind(3) << "Testing whether enabled space is the same"
377 << std::endl;
378 bool f = failed();
379 bool cf = c.failed();
380 if (f != cf)
381 return false;
382 if (f)
383 return true;
384
385 for (int i=x.size(); i--; )
386 if (x[i].glbSize() != c.x[i].glbSize() ||
387 x[i].lubSize() != c.x[i].lubSize() ||
388 x[i].cardMin() != c.x[i].cardMin() ||
389 x[i].cardMax() != c.x[i].cardMax())
390 return false;
391
392 for (int i=y.size(); i--; )
393 if (y[i].size() != c.y[i].size())
394 return false;
395
396 if (reified && (r.var().size() != c.r.var().size()))
397 return false;
398 if (opt.log)
399 olog << ind(3) << "Finished testing whether enabled space is the same"
400 << std::endl;
401 return true;
402 }
403
404 bool
405 SetTestSpace::prune(const SetAssignment& a, Gecode::Support::RandomGenerator& rand) {

Callers 2

getUnWatchedMethod · 0.45
unWatchedMethod · 0.45

Calls 8

indClass · 0.85
failedMethod · 0.45
sizeMethod · 0.45
glbSizeMethod · 0.45
lubSizeMethod · 0.45
cardMinMethod · 0.45
cardMaxMethod · 0.45
varMethod · 0.45

Tested by

no test coverage detected