17 inline ibex::Interval to_ibex(
const Interval& x)
19 return { x.lb(), x.ub() };
22 inline Interval to_codac(
const ibex::Interval& x)
24 return { x.lb(), x.ub() };
27 #define cast_vector(OutputType,convert) \
29 OutputType x_(x.size()); \
30 for(Index i = 0 ; i < (Index)x.size() ; i++) \
31 x_[i] = convert(x[i]); \
36 cast_vector(ibex::Vector,
double);
46 cast_vector(ibex::IntervalVector,to_ibex);
54 #define cast_matrix(OutputType,convert_f,output_ij,input_ij,rows_,cols_) \
56 OutputType x_(x.rows_(), x.cols_()); \
57 for(Index i = 0 ; i < (Index)x.rows_() ; i++) \
58 for(Index j = 0 ; j < (Index)x.cols_() ; j++) \
59 output_ij = convert_f(input_ij); \
64 cast_matrix(ibex::Matrix,
double,x_[i][j],x(i,j),rows,cols);
69 cast_matrix(
codac2::Matrix,
double,x_(i,j),x[i][j],nb_rows,nb_cols);
74 cast_matrix(ibex::IntervalMatrix,to_ibex,x_[i][j],x(i,j),rows,cols);
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:49
Definition codac2_OctaSym.h:21
Eigen::Matrix< double,-1, 1 > Vector
Alias for a dynamically-sized column vector of doubles.
Definition codac2_Vector.h:24
Eigen::Matrix< Interval,-1, 1 > IntervalVector
Alias for a dynamic-size column vector of intervals.
Definition codac2_IntervalVector.h:25
Eigen::Matrix< double,-1,-1 > Matrix
Alias for a dynamic-size matrix of doubles.
Definition codac2_Matrix.h:26
Eigen::Matrix< Interval,-1,-1 > IntervalMatrix
Alias for a dynamic-size matrix of intervals.
Definition codac2_IntervalMatrix.h:25