Do two set variables have equal least-upper-bounds?
| 38 | |
| 39 | /// Do two set variables have equal least-upper-bounds? |
| 40 | bool |
| 41 | equalLUB(const Set::SetView& x, const Set::SetView& y) { |
| 42 | unsigned int n = x.lubSize(); |
| 43 | if (n != y.lubSize()) return false; |
| 44 | for (unsigned int i = 0 ; i < n ; i++) |
| 45 | if (x.lubMinN(i) != y.lubMinN(i)) |
| 46 | return false; |
| 47 | return true; |
| 48 | } |
| 49 | }}} |
| 50 | |
| 51 | // Note carefully that this is in the Gecode::Int::LDSB namespace, not |