| 38 | namespace Gecode { |
| 39 | |
| 40 | void |
| 41 | atmostOne(Home home, const SetVarArgs& xa, unsigned int c) { |
| 42 | Set::Limits::check(c, "Set::atmostOne"); |
| 43 | GECODE_POST; |
| 44 | if (xa.size() < 2) |
| 45 | return; |
| 46 | ViewArray<SetView> x(home,xa); |
| 47 | GECODE_ES_FAIL(Distinct::AtmostOne::post(home, x, c)); |
| 48 | } |
| 49 | |
| 50 | } |
| 51 |