void CtcNotIn::contract(IntervalVector& box) { // it's simpler here to use direct computation, but // we could also have used CtCunion of two CtcFwdBwd IntervalVector savebox(box); try { HC4Revise().proj(f,d1,box); } catch (EmptyBoxException& ) {box.set_empty(); } try { HC4Revise().proj(f,d2,savebox); } catch (EmptyBoxException& ) {savebox.set_empty(); } box |= savebox; if (box.is_empty()) throw EmptyBoxException(); }
void CtcIn::contract(IntervalVector& box) { // it's simpler here to use direct computation, but // we could also have used CtcFwdBwd try { HC4Revise().proj(_f,_d,box); } catch (EmptyBoxException& e) { box.set_empty(); throw e; } }
void Function::backward(const Domain& y, IntervalVector& x) const { HC4Revise().proj(*this,y,x); }