Full pivot LU decomposition for matrix of interval, based on Eigen decomposition. The decomposition is of the form M = P{-1} [L][U] Q{-1} where P and Q are permutation matrices, and [L] and [U] are lower and upper interval matrices ([L] diagonal is 1).
More...
#include <codac2_IntvFullPivLU.h>
|
| IntvFullPivLU (const Matrix &M) |
| constructor from Matrix of double
|
|
| IntvFullPivLU (const IntervalMatrix &M) |
| constructor from Matrix of intervals. Eigen decomposition is done on M.mid().
|
|
BoolInterval | is_injective () const |
| check if the matrix is injective, i.e. its rank is equal to its number of rows.
|
|
BoolInterval | is_invertible () const |
| check if the initial matrix is invertible i.e. it is square and full rank
|
|
BoolInterval | is_surjective () const |
| check if the matrix is surjective i.e. its rank is equal to its number of cols.
|
|
Interval | determinant () const |
| return an interval enclosing the determinant
|
|
Interval | rank () const |
| return a interval enclosing the rank. Quite precise for square matrix (number of diagonal elements of [U] not containing 0). Less for non-square matrices, where each row/column outside the top-left part of [U] can change the rank. However, if no diagonal element contains 0, the return is unambiguous.
|
|
Interval | dimension_of_kernel () const |
| approximation of the size of the kernel space. based on the result of rank() (number of cols-rank()). As such, this is not the exact size of the kernel space as build by kernel()
|
|
IntervalMatrix | kernel () const |
| overapproximation of the kernel space as a matrix of column vectors. any vector V which is not a linear combination of the column vectors is guaranteed to be outside the kernel ( \(MV \neq 0\) )
|
|
template<typename Derived> |
Derived | image (const Eigen::MatrixBase< Derived > &M) const |
| `‘underapproximation’' of the column space of the matrix, ie return a set of independant columns of the original matrix which is possibly maximal. As for Eigen, you must provide the original matrix used for the decomposition.
|
|
IntervalMatrix | solve (const IntervalMatrix &rhs) const |
| equation solving M X = rhs precisely look for solutions where the only non-zero values are those on non-zero pivots if the matrix is full-rank and surjective (cols >= rows), it gives an overapproximation of the solutions (for each possible values of rhs) if the matrix is full-rank and injective (rows >= cols), it returns empty if no solution is possible, and a possible overapproximation of the solutions otherwise (but there may still be no solution) if the matrix is not full-rank, empty means that no solution is possible with the initial precondition (non-zero values for non-zero pivots) non empty presents the possible solutions found
|
|
IntervalMatrix | reconstructed_matrix () const |
| rebuilding of the matrix, ie compute P^{-1}[L][U]Q^{-1} can be used to evaluate the precision of the decomposition
|
|
double | max_pivot () const |
| maximum magnitude of the diagonal elements of [U]
|
|
const Eigen::FullPivLU< Matrix >::PermutationPType & | permutation_P () const |
| the permutation P in the decomposition P{-1}LUQ{-1}
|
|
const Eigen::FullPivLU< Matrix >::PermutationQType & | permutation_Q () const |
| the permutation Q in the decomposition P{-1}LUQ{-1}
|
|
const Eigen::FullPivLU< Matrix > & | eigen_LU () const |
| the Eigen decomposition of M.mid()
|
|
const IntervalMatrix & | matrix_LU () const |
| returns the matrix storing [L] and [U] ([L] for strictly lower part, [U] for upper part)
|
|
Full pivot LU decomposition for matrix of interval, based on Eigen decomposition. The decomposition is of the form M = P{-1} [L][U] Q{-1} where P and Q are permutation matrices, and [L] and [U] are lower and upper interval matrices ([L] diagonal is 1).
◆ IntvFullPivLU() [1/2]
codac2::IntvFullPivLU::IntvFullPivLU |
( |
const Matrix & | M | ) |
|
|
explicit |
constructor from Matrix of double
- Parameters
-
M | the matrix for which the decomposition is computed |
◆ IntvFullPivLU() [2/2]
codac2::IntvFullPivLU::IntvFullPivLU |
( |
const IntervalMatrix & | M | ) |
|
|
explicit |
constructor from Matrix of intervals. Eigen decomposition is done on M.mid().
- Parameters
-
M | the matrix of intervals. |
◆ is_injective()
check if the matrix is injective, i.e. its rank is equal to its number of rows.
- Returns
- TRUE, FALSE or UNKNOWN
◆ is_invertible()
check if the initial matrix is invertible i.e. it is square and full rank
- Returns
- TRUE, FALSE or UNKNOWN
◆ is_surjective()
check if the matrix is surjective i.e. its rank is equal to its number of cols.
- Returns
- TRUE, FALSE or UNKNOWN
◆ determinant()
Interval codac2::IntvFullPivLU::determinant |
( |
| ) |
const |
return an interval enclosing the determinant
- Precondition
- the matrix is square
- Returns
- the product of the diagonal elements of [U]
◆ rank()
Interval codac2::IntvFullPivLU::rank |
( |
| ) |
const |
return a interval enclosing the rank. Quite precise for square matrix (number of diagonal elements of [U] not containing 0). Less for non-square matrices, where each row/column outside the top-left part of [U] can change the rank. However, if no diagonal element contains 0, the return is unambiguous.
- Returns
- an interval enclosing the possible ranks.
◆ dimension_of_kernel()
Interval codac2::IntvFullPivLU::dimension_of_kernel |
( |
| ) |
const |
approximation of the size of the kernel space. based on the result of rank() (number of cols-rank()). As such, this is not the exact size of the kernel space as build by kernel()
- Returns
- an interval enclosing the possible dimensions.
◆ kernel()
IntervalMatrix codac2::IntvFullPivLU::kernel |
( |
| ) |
const |
overapproximation of the kernel space as a matrix of column vectors. any vector V which is not a linear combination of the column vectors is guaranteed to be outside the kernel ( \(MV \neq 0\) )
- Returns
- a matrix of column vectors, may be empty
◆ image()
template<typename Derived>
Derived codac2::IntvFullPivLU::image |
( |
const Eigen::MatrixBase< Derived > & | M | ) |
const |
|
inline |
`‘underapproximation’' of the column space of the matrix, ie return a set of independant columns of the original matrix which is possibly maximal. As for Eigen, you must provide the original matrix used for the decomposition.
- Precondition
- M is the matrix used to build the decomposition
- Parameters
-
M | the matrix used to build the decomposition. |
- Returns
- a matrix of columns of M, or one vector of 0 if the rank of M may be 0.
186{
187 int rk = this->
rank().
lb();
188 if (rk==0) {
189 return Derived::Zero(M.rows(),1);
190
191
192 }
193 Derived ret =
194 Derived::Zero(M.rows(),rk);
195 Index p = 0;
196 Index dim = std::min(matrixLU_.rows(),matrixLU_.cols());
197 auto Q = this->_LU.permutationQ();
198 for (Index i = 0; i<dim; i++) {
199 if (!matrixLU_(i,i).contains(0.0)) {
200 ret.col(p) = M.col(Q.indices().coeff(i));
201 p++;
202 }
203 }
204 return ret;
205}
double lb() const
Returns the lower bound of this.
Definition codac2_Interval_impl.h:102
Interval rank() const
return a interval enclosing the rank. Quite precise for square matrix (number of diagonal elements of...
◆ solve()
IntervalMatrix codac2::IntvFullPivLU::solve |
( |
const IntervalMatrix & | rhs | ) |
const |
equation solving M X = rhs precisely look for solutions where the only non-zero values are those on non-zero pivots if the matrix is full-rank and surjective (cols >= rows), it gives an overapproximation of the solutions (for each possible values of rhs) if the matrix is full-rank and injective (rows >= cols), it returns empty if no solution is possible, and a possible overapproximation of the solutions otherwise (but there may still be no solution) if the matrix is not full-rank, empty means that no solution is possible with the initial precondition (non-zero values for non-zero pivots) non empty presents the possible solutions found
- Parameters
-
rhs | right-hand side of the equation |
- Returns
- a potential solution of the equation M X = rhs
◆ reconstructed_matrix()
IntervalMatrix codac2::IntvFullPivLU::reconstructed_matrix |
( |
| ) |
const |
rebuilding of the matrix, ie compute P^{-1}[L][U]Q^{-1} can be used to evaluate the precision of the decomposition
- Returns
- the reconstructed matrix
◆ max_pivot()
double codac2::IntvFullPivLU::max_pivot |
( |
| ) |
const |
maximum magnitude of the diagonal elements of [U]
- Returns
- the maximum
◆ permutation_P()
const Eigen::FullPivLU< Matrix >::PermutationPType & codac2::IntvFullPivLU::permutation_P |
( |
| ) |
const |
|
inline |
the permutation P in the decomposition P{-1}LUQ{-1}
- Returns
- the permutation P, as defined by Eigen
172 {
173 return this->_LU.permutationP();
174}
◆ permutation_Q()
const Eigen::FullPivLU< Matrix >::PermutationQType & codac2::IntvFullPivLU::permutation_Q |
( |
| ) |
const |
|
inline |
the permutation Q in the decomposition P{-1}LUQ{-1}
- Returns
- the permutation Q, as defined by Eigen
176 {
177 return this->_LU.permutationQ();
178}
◆ eigen_LU()
const Eigen::FullPivLU< Matrix > & codac2::IntvFullPivLU::eigen_LU |
( |
| ) |
const |
|
inline |
the Eigen decomposition of M.mid()
- Returns
- the Eigen decomposition
179 {
180 return this->_LU;
181}
◆ matrix_LU()
const IntervalMatrix & codac2::IntvFullPivLU::matrix_LU |
( |
| ) |
const |
|
inline |
returns the matrix storing [L] and [U] ([L] for strictly lower part, [U] for upper part)
- Returns
- the interval matrix
168 {
169 return this->matrixLU_;
170}
The documentation for this class was generated from the following file: