Reify \a m to be the minimum of \a s
| 106 | |
| 107 | /// Reify \a m to be the minimum of \a s |
| 108 | void remin(Home home, SetVar s, IntVar m, Reify r) { |
| 109 | IntVar c(home, 0, static_cast<int>(Set::Limits::card)); |
| 110 | cardinality(home, s, c); |
| 111 | // Whether set is not empty |
| 112 | BoolVar ne(home, 0, 1); |
| 113 | rel(home, c, IRT_GR, 0, ne); |
| 114 | if (r.mode() != RM_PMI) |
| 115 | rel(home, r.var(), BOT_IMP, ne, 1); |
| 116 | min(home, s, m, ne); |
| 117 | } |
| 118 | |
| 119 | /// Reify \a m to be the maximum of \a s |
| 120 | void remax(Home home, SetVar s, IntVar m, Reify r) { |