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

Method TupleSetBase

test/int/extensional.cpp:399–417  ·  view source on GitHub ↗

Create and register test

Source from the content-addressed store, hash-verified

397 public:
398 /// Create and register test
399 TupleSetBase(bool p)
400 : Test("Extensional::TupleSet::" + str(p) + "::Base",
401 4,1,5,true,Gecode::IPL_DOM), t(4), pos(p) {
402 using namespace Gecode;
403 IntArgs t1({2, 1, 2, 4});
404 IntArgs t2({2, 2, 1, 4});
405 IntArgs t3({4, 3, 4, 1});
406 IntArgs t4({1, 3, 2, 3});
407 IntArgs t5({3, 3, 3, 2});
408 t.add(t1).add(t1).add(t2).add(t2)
409 .add(t3).add(t3).add(t4).add(t4)
410 .add(t5).add(t5).add(t5).add(t5)
411 .add(t5).add(t5).add(t5).add(t5)
412 .add(t1).add(t1).add(t2).add(t2)
413 .add(t3).add(t3).add(t4).add(t4)
414 .add(t5).add(t5).add(t5).add(t5)
415 .add(t5).add(t5).add(t5).add(t5)
416 .finalize();
417 }
418 /// %Test whether \a x is solution
419 virtual bool solution(const Assignment& x) const {
420 return pos == ((x[0] == 1 && x[1] == 3 && x[2] == 2 && x[3] == 3) ||

Callers

nothing calls this directly

Calls 2

finalizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected