ibex-team / ibex-lib

IBEX is a C++ library for constraint processing over real numbers.
http://ibex-team.github.io/ibex-lib/
GNU Lesser General Public License v3.0
67 stars 51 forks source link

Ctc_3BCid on a degenerated IntervalVector #541

Open NuwanHerathM opened 4 months ago

NuwanHerathM commented 4 months ago

The contractor Ctc_3BCid does not behave as expected when it contracts a degenerated IntervalVector.

/* contractors for the unit disk: x^2 + y^2 <= 1 */
Function f("x","y","x^2 + y^2 - 1");
Interval interval(NEG_INFINITY,0);
CtcFwdBwd c_fwdbwd(f,interval);
Ctc3BCid c_3bcid(c_fwdbwd);

/* box degenerated to the point (-5,0) */
double _x[2]={-5,0};
Vector x(2,_x);
IntervalVector box(x);

/* contraction of the box */
c_3bcid.contract(box);

/* display (-5,0) instead of empty vector */
cout << "Result of the contraction with Ctc3BCid composed with CtcFwdBwd:" << endl;
cout << '\t' << box << endl;

Calling c_fwdbwd.contract(box) instead of c_3bcid.contract(box) actually returns an empty vector.