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

Method sol

test/set/rel-op.cpp:60–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58
59 template<class I, class J>
60 bool
61 sol(I& i, J& j) const {
62 switch (srt) {
63 case SRT_EQ: return Iter::Ranges::equal(i,j);
64 case SRT_NQ: return !Iter::Ranges::equal(i,j);
65 case SRT_SUB: return Iter::Ranges::subset(i,j);
66 case SRT_SUP: return Iter::Ranges::subset(j,i);
67 case SRT_DISJ:
68 {
69 Gecode::Iter::Ranges::Inter<I,J> inter(i,j);
70 return !inter();
71 }
72 case SRT_CMPL:
73 {
74 Gecode::Set::RangesCompl<J> jc(j);
75 return Iter::Ranges::equal(i,jc);
76 }
77 default: GECODE_NEVER;
78 }
79 return false;
80 }
81
82 public:
83 /// Create and register test

Callers

nothing calls this directly

Calls 3

interFunction · 0.85
equalFunction · 0.50
subsetFunction · 0.50

Tested by

no test coverage detected