这个其实很简单,都不用popagator,直接区域求交就完成了
void dom(Home home, const IntVarArgs& x, const IntVarArgs& d, IntPropLevel) { using namespace Int; if (x.size() != d.size()) throw ArgumentSizeMismatch("Int::dom"); for (int i=x.size(); i--; ) { GECODE_POST; IntView xv(x[i]), dv(d[i]); if (!same(xv,dv)) { ViewRanges<IntView> r(dv); GECODE_ME_FAIL(xv.inter_r(home,r,false)); } } }
时间: 2024-10-14 15:05:01