| 42 | using namespace Gecode::Set::RelOp; |
| 43 | |
| 44 | void |
| 45 | rel(Home home, SetOpType op, const SetVarArgs& x, SetVar y) { |
| 46 | GECODE_POST; |
| 47 | ViewArray<SetView> xa(home,x); |
| 48 | switch (op) { |
| 49 | case SOT_UNION: |
| 50 | GECODE_ES_FAIL((RelOp::UnionN<SetView,SetView>::post(home, xa, y))); |
| 51 | break; |
| 52 | case SOT_DUNION: |
| 53 | GECODE_ES_FAIL( |
| 54 | (RelOp::PartitionN<SetView,SetView>::post(home, xa, y))); |
| 55 | break; |
| 56 | case SOT_INTER: |
| 57 | { |
| 58 | GECODE_ES_FAIL( |
| 59 | (RelOp::IntersectionN<SetView,SetView> |
| 60 | ::post(home, xa, y))); |
| 61 | } |
| 62 | break; |
| 63 | case SOT_MINUS: |
| 64 | throw IllegalOperation("Set::rel"); |
| 65 | break; |
| 66 | default: |
| 67 | throw UnknownOperation("Set::rel"); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | void |
| 72 | rel(Home home, SetOpType op, const SetVarArgs& x, const IntSet& z, SetVar y) { |