示例#1
0
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();

}
示例#2
0
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;
	}
}
示例#3
0
void Function::backward(const Domain& y, IntervalVector& x) const {
	HC4Revise().proj(*this,y,x);
}