Exemplo n.º 1
0
void CtcQInter2::contract(IntervalVector& box) {
	Array<IntervalVector> refs(list.size());

	for (int i=0; i<list.size(); i++) {
		boxes[i]=box;
		list[i].contract(boxes[i]);
		refs.set_ref(i,boxes[i]);
	}

	box = qinter2(refs,q);
}
Exemplo n.º 2
0
void CtcQInter2::contract(IntervalVector& box) {
	Array<IntervalVector> refs(list.size());

	for (int i=0; i<list.size(); i++) {
		try {
			boxes[i]=box;
			list[i].contract(boxes[i]);
		} catch(EmptyBoxException&) {
			assert(boxes[i].is_empty());
		}
		refs.set_ref(i,boxes[i]);
	}

	box = qinter2(refs,q);

	if (box.is_empty()) throw EmptyBoxException();
}