| 247 | |
| 248 | template<class I, class J> |
| 249 | bool |
| 250 | sol(I& i, J& j) const { |
| 251 | switch (srt) { |
| 252 | case SRT_EQ: return Iter::Ranges::equal(i,j); |
| 253 | case SRT_NQ: return !Iter::Ranges::equal(i,j); |
| 254 | case SRT_SUB: return Iter::Ranges::subset(i,j); |
| 255 | case SRT_SUP: return Iter::Ranges::subset(j,i); |
| 256 | case SRT_DISJ: |
| 257 | { |
| 258 | Gecode::Iter::Ranges::Inter<I,J> inter(i,j); |
| 259 | return !inter(); |
| 260 | } |
| 261 | case SRT_CMPL: |
| 262 | { |
| 263 | Gecode::Set::RangesCompl<J> jc(j); |
| 264 | return Iter::Ranges::equal(i,jc); |
| 265 | } |
| 266 | default: GECODE_NEVER; |
| 267 | } |
| 268 | GECODE_NEVER; |
| 269 | return false; |
| 270 | } |
| 271 | |
| 272 | public: |
| 273 | /// Create and register test |