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

Method TupleSetLarge

test/int/extensional.cpp:512–527  ·  view source on GitHub ↗

Create and register test

Source from the content-addressed store, hash-verified

510 public:
511 /// Create and register test
512 TupleSetLarge(double prob, bool p)
513 : Test("Extensional::TupleSet::" + str(p) + "::Large",
514 5,1,5,true,Gecode::IPL_DOM), pos(p), t(5) {
515 using namespace Gecode;
516
517 CpltAssignment ass(5, IntSet(1, 5));
518 while (ass.has_more()) {
519 if (_rand(100) <= prob*100) {
520 IntArgs tuple(5);
521 for (int i = 5; i--; ) tuple[i] = ass[i];
522 t.add(tuple);
523 }
524 ass.next(_rand);
525 }
526 t.finalize();
527 }
528 /// %Test whether \a x is solution
529 virtual bool solution(const Assignment& x) const {
530 using namespace Gecode;

Callers

nothing calls this directly

Calls 5

IntSetClass · 0.85
has_moreMethod · 0.45
addMethod · 0.45
nextMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected