18 enum LeftOrRightInv { LEFT_INV, RIGHT_INV };
34 template<LeftOrRightInv O=LEFT_INV,
typename OtherDerived,
typename OtherDerived_>
37 assert_release(A.is_squared());
38 assert_release(B.is_squared());
40 auto A_ = A.template cast<Interval>();
41 auto B_ = B.template cast<Interval>();
44 assert_release(N==B_.rows());
46 auto Id = IntervalMatrix::Identity(N,N);
47 auto erMat = [&]() {
if constexpr(O == LEFT_INV)
return -B_*A_+Id;
else return -A_*B_+Id; }();
60 for (Index c=0;c<N;c++) {
61 for (Index r=0;r<N;r++) {
63 for (Index k=0;k<N;k++) {
64 if constexpr(O == LEFT_INV)
86 template<
typename OtherDerived>
89 assert_release(A.is_squared());
92 if constexpr(std::is_same_v<typename OtherDerived::Scalar,Interval>)
94 (A.mid()).fullPivLu().solve(Matrix::Identity(N,N)));
98 A.fullPivLu().solve(Matrix::Identity(N,N)));
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:49
Eigen::Matrix< Interval,-1,-1 > IntervalMatrix
Alias for a dynamic-size matrix of intervals.
Definition codac2_IntervalMatrix.h:25
bool is_unbounded() const
Checks if the interval matrix contains any unbounded intervals.
Definition codac2_MatrixBase_addons_IntervalMatrixBase.h:283
IntervalMatrix inverse_enclosure(const Eigen::MatrixBase< OtherDerived > &A)
Enclosure of the inverse of a (non-singular) matrix expression, possibly an interval matrix.
Definition codac2_inversion.h:87
IntervalMatrix inverse_correction(const Eigen::MatrixBase< OtherDerived > &A, const Eigen::MatrixBase< OtherDerived_ > &B)
Correct the approximation of the inverse of a square matrix by providing a reliable enclosure .
Definition codac2_inversion.h:35
IntervalMatrix infinite_sum_enclosure(const IntervalMatrix &A, double &mrad)
Compute an upper bound of , with a matrix of intervals as an "error term" (uses only bounds on coeff...