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--; ) {
359 int literals =
static_cast<int>(ts()->domsize*x.size());
360 for (
int i = literals;
i--; )
361 if (support_data[
i]) {
363 while (lastse->
next() != NULL)
364 lastse = lastse->
next();
365 support_data[
i]->
dispose(home, lastse);
371 return sizeof(*this);
377 assert(!w_support.empty() || !w_remove.empty() || unassigned==0);
386 while (!w_support.empty() || !w_remove.empty()) {
387 while (!w_remove.empty()) {
389 w_remove.pop(home,i,n);
391 if (dom[i].
get(static_cast<unsigned int>(n-ts()->
min))) {
393 dom[
i].
clear(static_cast<unsigned int>(n-ts()->
min));
396 while (!w_support.empty()) {
398 w_support.pop(home,i,n);
400 if (dom[i].
get(static_cast<unsigned int>(n-ts()->
min)))
401 find_support(home, dom, i, n);
414 SupportAdvisor&
a =
static_cast<SupportAdvisor&
>(
_a);
416 bool scheduled = !w_support.empty() || !w_remove.empty();
420 for (
int n = ts()->
min; n <= ts()->max; n++) {
421 if (vv() && (n == vv.
val())) {
426 remove_support(home, s->t, a.i, n);
429 for (
int n = x[a.i].min(d); n <= x[a.i].max(d); n++)
431 remove_support(home, s->t, a.i, n);
438 if (((w_support.empty() && w_remove.empty()) || scheduled) &&
443 }
else if ((w_support.empty() && w_remove.empty()) || scheduled) {