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

Method TupleSetBool

test/int/extensional.cpp:563–578  ·  view source on GitHub ↗

Create and register test

Source from the content-addressed store, hash-verified

561 public:
562 /// Create and register test
563 TupleSetBool(double prob, bool p)
564 : Test("Extensional::TupleSet::" + str(p) + "::Bool",
565 5,0,1,true), pos(p), t(5) {
566 using namespace Gecode;
567
568 CpltAssignment ass(5, IntSet(0, 1));
569 while (ass.has_more()) {
570 if (_rand(100) <= prob*100) {
571 IntArgs tuple(5);
572 for (int i = 5; i--; ) tuple[i] = ass[i];
573 t.add(tuple);
574 }
575 ass.next(_rand);
576 }
577 t.finalize();
578 }
579 /// %Test whether \a x is solution
580 virtual bool solution(const Assignment& x) const {
581 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