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

Method sol

test/set/rel-op-const.cpp:64–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63 template<class I, class J>
64 bool
65 sol(I& i, J& j) const {
66 switch (srt) {
67 case SRT_EQ: return Iter::Ranges::equal(i,j);
68 case SRT_NQ: return !Iter::Ranges::equal(i,j);
69 case SRT_SUB: return Iter::Ranges::subset(i,j);
70 case SRT_SUP: return Iter::Ranges::subset(j,i);
71 case SRT_DISJ:
72 {
73 Gecode::Iter::Ranges::Inter<I,J> inter(i,j);
74 return !inter();
75 }
76 case SRT_CMPL:
77 {
78 Gecode::Set::RangesCompl<J> jc(j);
79 return Iter::Ranges::equal(i,jc);
80 }
81 default: GECODE_NEVER;
82 }
83 return false;
84 }
85
86 public:
87 /// 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