forceinline ModEvent ValCommitFunction<View>::commit(Space& home, unsigned int a, View x, int i, Val n) { typename View::VarType y(x.varimp()); c(home,a,y,i,n); return home.failed() ? ES_FAILED : ES_OK; }
forceinline size_t ElementUnion<SView,RView>::dispose(Space& home) { home.ignore(*this,AP_DISPOSE); if (!home.failed()) { x0.cancel(home,*this,PC_SET_ANY); x1.cancel(home,*this,PC_SET_ANY); iv.cancel(home,*this,PC_SET_ANY); } (void) Propagator::dispose(home); return sizeof(*this); }
forceinline size_t ElementUnionConst<SView,RView>::dispose(Space& home) { home.ignore(*this,AP_DISPOSE); if (!home.failed()) { x0.cancel(home,*this, PC_SET_ANY); x1.cancel(home,*this, PC_SET_ANY); } for (unsigned int i=n_iv; i--;) iv[i].~IntSet(); (void) Propagator::dispose(home); return sizeof(*this); }
forceinline size_t Incremental<View>::dispose(Space& home) { if (!home.failed()) { int literals = static_cast<int>(ts()->domsize*x.size()); for (int i = literals; i--; ) if (support_data[i]) { SupportEntry* lastse = support_data[i]; while (lastse->next() != NULL) lastse = lastse->next(); support_data[i]->dispose(home, lastse); } home.rfree(support_data, sizeof(SupportEntry*)*literals); } ac.dispose(home); (void) Base<View,false>::dispose(home); return sizeof(*this); }
size_t NoGoodsProp::dispose(Space& home) { if (home.failed()) { // This will be executed when one ngl returned true for notice() NGL* l = root; while (l != NULL) { NGL* t = l->next(); (void) l->dispose(home); l = t; } } else if (root != NULL) { // This will be executed for subsumption NGL* l = disposenext(root,home,*this,true); while ((l != NULL) && l->leaf()) l = disposenext(l,home,*this,true); if (l != NULL) l = disposenext(l,home,*this,true); while (l != NULL) l = disposenext(l,home,*this,false); } home.ignore(*this,AP_DISPOSE,true); (void) Propagator::dispose(home); return sizeof(*this); }