%Test whether \a x is solution
| 68 | s(s0), t(t0) {} |
| 69 | /// %Test whether \a x is solution |
| 70 | virtual bool solution(const SetAssignment& x) const { |
| 71 | int n = x.size(); |
| 72 | for (int i = 0 ; i < n ; i++) { |
| 73 | if (!in(s,x[i]) && in(t,x[i])) |
| 74 | return false; |
| 75 | if (in(s,x[i]) && !in(t,x[i])) |
| 76 | return true; |
| 77 | } |
| 78 | return true; |
| 79 | } |
| 80 | /// Post constraint on \a x |
| 81 | virtual void post(Gecode::Space& home, Gecode::SetVarArray& x, |
| 82 | Gecode::IntVarArray&) { |