42 namespace Gecode {
namespace Int {
namespace Extensional {
51 Incremental<View>::SupportAdvisor::
52 SupportAdvisor(Space& home, Propagator&
p, Council<SupportAdvisor>&
c,
54 : Advisor(home,p,c),
i(i0) {}
58 Incremental<View>::SupportAdvisor::
59 SupportAdvisor(Space& home,
bool share, SupportAdvisor&
a)
60 : Advisor(home,share,a),
i(a.
i) {}
64 Incremental<View>::SupportAdvisor::
65 dispose(Space& home, Council<SupportAdvisor>&
c) {
66 Advisor::dispose(home,c);
159 return home.fl_alloc<
sizeof(
WorkEntry)>();
211 int literals =
static_cast<int>(
ts()->
domsize*
x.size());
213 for (
int i = literals;
i--; )
220 for (
int i =
x.size();
i--; ) {
246 for (
int j =
x.size(); j--; ) {
248 int ov = v -
ts()->
min;
254 while ((*a)->t != l) {
255 assert((*a)->next() != NULL);
283 for (
int i = x.
size();
i--; )
287 x[
i].
subscribe(home,*
new (home) SupportAdvisor(home,*
this,ac,
i));
295 for (
int i = x.
size();
i--; )
301 View::schedule(home,*
this,
309 for (
int i = x.
size();
i--; ) {
320 :
Base<View,false>(home,share,p), support_data(NULL),
321 unassigned(p.unassigned) {
322 ac.
update(home,share,p.ac);
325 for (
int i = static_cast<int>(
ts()->domsize*
x.size());
i--; ) {
360 int literals =
static_cast<int>(ts()->domsize*
x.size());
361 for (
int i = literals;
i--; )
362 if (support_data[
i]) {
364 while (lastse->
next() != NULL)
365 lastse = lastse->
next();
366 support_data[
i]->
dispose(home, lastse);
372 return sizeof(*this);
378 assert(!w_support.empty() || !w_remove.empty() || unassigned==0);
387 while (!w_support.empty() || !w_remove.empty()) {
388 while (!w_remove.empty()) {
390 w_remove.pop(home,i,n);
392 if (dom[i].
get(static_cast<unsigned int>(n-ts()->
min))) {
394 dom[
i].
clear(static_cast<unsigned int>(n-ts()->
min));
397 while (!w_support.empty()) {
399 w_support.pop(home,i,n);
401 if (dom[i].
get(static_cast<unsigned int>(n-ts()->
min)))
402 find_support(home, dom, i, n);
415 SupportAdvisor&
a =
static_cast<SupportAdvisor&
>(
_a);
417 bool scheduled = !w_support.empty() || !w_remove.empty();
421 for (
int n = ts()->
min;
n <= ts()->max;
n++) {
422 if (vv() && (
n == vv.
val())) {
427 remove_support(home, s->t, a.i,
n);
430 for (
int n =
x[a.i].min(d);
n <=
x[a.i].max(d);
n++)
432 remove_support(home, s->t, a.i,
n);
439 if (((w_support.empty() && w_remove.empty()) || scheduled) &&
444 }
else if ((w_support.empty() && w_remove.empty()) || scheduled) {