40 namespace Gecode {
namespace Set {
namespace Element {
42 template<
class SView,
class RView>
53 for (
unsigned int i=iv0.
size();
i--;)
57 template<
class SView,
class RView>
63 x0.update(home,share,p.
x0);
64 x1.update(home,share,p.
x1);
66 for (
unsigned int i=
n_iv;
i--;)
67 iv[
i].update(home,share,p.
iv[
i]);
70 template<
class SView,
class RView>
76 template<
class SView,
class RView>
84 for (
unsigned int i=n_iv;
i--;)
90 template<
class SView,
class RView>
105 template<
class SView,
class RView>
111 template<
class SView,
class RView>
116 bool* stillSelected = r.
alloc<
bool>(n_iv);
121 for (
int i=n_iv;
i--;)
122 stillSelected[
i] =
false;
146 unsigned int maxCard = 0;
160 bool selectSingleInconsistent =
false;
161 if (x1.cardMax() <= 1) {
163 IntSetRanges candub(iv[i]);
165 IntSetRanges > diff2(x0lb, candub);
166 selectSingleInconsistent = diff2() || candidateCard < x0.cardMin();
177 if (selectSingleInconsistent ||
178 candidateCard > x0.cardMax() ||
184 stillSelected[
i] =
true;
187 if (vx1() && vx1.
val()==
i) {
190 IntSetRanges candlb(iv[i]);
191 ModEvent me = x0.includeI(home,candlb);
197 before[
i].
update(home,sofarBefore);
198 IntSetRanges cub(iv[i]);
200 IntSetRanges clb(iv[i]);
202 maxCard =
std::max(maxCard, candidateCard);
203 minCard =
std::min(minCard, candidateCard);
209 if (x1.cardMax()==0) {
214 for (
int i=n_iv;
i--;)
215 if (stillSelected[
i])
222 if (x1.cardMin() > 0) {
226 ModEvent me = x0.includeI(home, si);
229 me = x0.cardMin(home, minCard);
235 if (x1.cardMax() <= 1) {
236 ModEvent me = x0.cardMax(home, maxCard);
244 ModEvent me = x0.intersectI(home,sfB);
255 for (
int i=n_iv;
i--;) {
256 if (!stillSelected[
i])
284 assert(x0.assigned());