示例#1
0
 forceinline size_t
 ReIntSet<View,rm>::dispose(Space& home) {
   home.ignore(*this,AP_DISPOSE);
   is.~IntSet();
   (void) ReUnaryPropagator<View,PC_INT_DOM,BoolView>::dispose(home);
   return sizeof(*this);
 }
示例#2
0
 forceinline size_t
 Sequence<View,Val>::dispose(Space& home) {
   home.ignore(*this,AP_DISPOSE);
   ac.dispose(home);
   s.~Val();
   (void) Propagator::dispose(home);
   return sizeof(*this);
 }
示例#3
0
 forceinline size_t
 Int<V0,V1,Idx,Val>::dispose(Space& home) {
   home.ignore(*this,AP_DISPOSE);
   x0.cancel(home,*this,PC_INT_DOM);
   x1.cancel(home,*this,PC_INT_DOM);
   c.~IntSharedArray();
   (void) Propagator::dispose(home);
   return sizeof(*this);
 }
示例#4
0
 forceinline size_t
 ViewBase<VX,VY,VZ>::dispose(Space& home) {
   if (vtd(y) == VTD_INTSET)
     home.ignore(*this,AP_DISPOSE);
   x.cancel(home,*this,PC_INT_DOM);
   cancel(home,*this,y);
   z.cancel(home,*this,PC_INT_BND);
   (void) Propagator::dispose(home);
   return sizeof(*this);
 }
示例#5
0
 forceinline size_t
 IntBase<VX,VY>::dispose(Space& home) {
   if (vtd(y) == VTD_INTSET)
     home.ignore(*this,AP_DISPOSE);
   for (int i=n_s; i--; )
     x[i].cancel(home,*this,PC_INT_DOM);
   cancel(home,*this,y);
   (void) Propagator::dispose(home);
   return sizeof(*this);
 }
示例#6
0
 forceinline size_t
 Weights<View>::dispose(Space& home) {
   home.ignore(*this,AP_DISPOSE);
   x.cancel(home,*this, PC_SET_ANY);
   y.cancel(home,*this, Gecode::Int::PC_INT_BND);
   elements.~SharedArray();
   weights.~SharedArray();
   (void) Propagator::dispose(home);
   return sizeof(*this);
 }
示例#7
0
文件: union.hpp 项目: akiernan/gecode
 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);
 }
示例#8
0
 forceinline size_t
 Base<View,subscribe>::dispose(Space& home) {
   home.ignore(*this,AP_DISPOSE);
   (void) Propagator::dispose(home);
   if (subscribe)
     x.cancel(home,*this,PC_INT_DOM);
   // take care of last_data
   unsigned int literals = ts()->domsize*x.size();
   home.rfree(last_data, sizeof(Tuple*)*literals);
   (void) tupleSet.~TupleSet();
   return sizeof(*this);
 }
示例#9
0
 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);
 }
示例#10
0
 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);
 }
示例#11
0
 forceinline size_t
 EqInt<VY>::dispose(Space& home) {
   home.ignore(*this, AP_WEAKLY);
   (void) IntBase<VY>::dispose(home);
   return sizeof(*this);
 }