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

Method sol

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

Source from the content-addressed store, hash-verified

158
159 template<class I, class J>
160 bool
161 sol(I& i, J& j) const {
162 switch (srt) {
163 case SRT_EQ: return Iter::Ranges::equal(i,j);
164 case SRT_NQ: return !Iter::Ranges::equal(i,j);
165 case SRT_SUB: return Iter::Ranges::subset(i,j);
166 case SRT_SUP: return Iter::Ranges::subset(j,i);
167 case SRT_DISJ:
168 {
169 Gecode::Iter::Ranges::Inter<I,J> inter(i,j);
170 return !inter();
171 }
172 case SRT_CMPL:
173 {
174 Gecode::Set::RangesCompl<J> jc(j);
175 return Iter::Ranges::equal(i,jc);
176 }
177 default: GECODE_NEVER;
178 }
179 GECODE_NEVER;
180 return false;
181 }
182
183 public:
184 /// 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