示例#1
0
文件: seq-u.hpp 项目: MGKhKhD/easy-IP
 forceinline ExecStatus
 SeqU::post(Home home, ViewArray<SetView> x, SetView y) {
   switch (x.size()) {
   case 0:
     GECODE_ME_CHECK(y.cardMax(home, 0));
     return ES_OK;
   case 1:
     return Rel::Eq<SetView,SetView>::post(home, x[0], y);
   default:
     if (x.shared(home) || x.shared(home,y))
       return ES_FAILED;
     (void) new (home) SeqU(home,x,y);
     return ES_OK;
   }
 }
示例#2
0
 forceinline ExecStatus
 Seq::post(Home home, ViewArray<SetView> x) {
   if (x.shared(home))
     return ES_FAILED;
   (void) new (home) Seq(home,x);
   return ES_OK;
 }
示例#3
0
文件: union.hpp 项目: Gecode/gecode
 forceinline
 UnionN<View0,View1>::UnionN(Home home, ViewArray<View0>& x,
                             const IntSet& z, View1 y)
   : MixNaryOnePropagator<View0,PC_SET_ANY,View1,PC_SET_ANY>(home,x,y) {
   shared = x.shared(home) || viewarrayshared(home,x,y);
   IntSetRanges rz(z);
   unionOfDets.includeI(home, rz);
 }
示例#4
0
文件: union.hpp 项目: Gecode/gecode
 forceinline
 UnionN<View0,View1>::UnionN(Home home, ViewArray<View0>& x, View1 y)
   : MixNaryOnePropagator<View0,PC_SET_ANY,View1,PC_SET_ANY>(home,x,y) {
   shared = x.shared(home) || viewarrayshared(home,x,y);
 }