ExecStatus LqView<VX,VY,VZ,shr>::post(Home home, ViewArray<VX>& x, VY y, VZ z, int c) { GECODE_ME_CHECK(z.gq(home,-c)); if (z.assigned()) return LqInt<VX,VY>::post(home,x,y,z.val()+c); if (sharing(x,y,z)) (void) new (home) LqView<VX,VY,VZ,true>(home,x,y,z,c); else (void) new (home) LqView<VX,VY,VZ,false>(home,x,y,z,c); return ES_OK; }
ExecStatus EqView<VX,VY,VZ,shr,dom>::post(Home home, ViewArray<VX>& x, VY y, VZ z, int c) { GECODE_ME_CHECK(z.gq(home,-c)); GECODE_ME_CHECK(z.lq(home,x.size()-c)); if ((vtd(y) != VTD_VARVIEW) && z.assigned()) return EqInt<VX,VY>::post(home,x,y,z.val()+c); if (sharing(x,y,z)) (void) new (home) EqView<VX,VY,VZ,true,dom>(home,x,y,z,c); else (void) new (home) EqView<VX,VY,VZ,false,dom>(home,x,y,z,c); return ES_OK; }