Create and register test
| 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; |