|
| | SparseQR (const MatrixType &mat) |
| | Construct a QR factorization of the matrix mat.
|
| |
| void | compute (const MatrixType &mat) |
| | Computes the QR factorization of the sparse matrix mat.
|
| |
| void | analyzePattern (const MatrixType &mat) |
| | Preprocessing step of a QR factorization.
|
| |
| void | factorize (const MatrixType &mat) |
| | Performs the numerical QR factorization of the input matrix.
|
| |
| Index | rows () const |
| |
| Index | cols () const |
| |
| const QRMatrixType & | matrixR () const |
| |
| Index | rank () const |
| |
| SparseQRMatrixQReturnType< SparseQR > | matrixQ () const |
| |
| const PermutationType & | colsPermutation () const |
| |
| std::string | lastErrorMessage () const |
| |
|
template<typename Rhs , typename Dest > |
| bool | _solve_impl (const MatrixBase< Rhs > &B, MatrixBase< Dest > &dest) const |
| |
| void | setPivotThreshold (const RealScalar &threshold) |
| | Sets the threshold that is used to determine linearly dependent columns during the factorization.
|
| |
| template<typename Rhs > |
| const Solve< SparseQR, Rhs > | solve (const MatrixBase< Rhs > &B) const |
| |
|
template<typename Rhs > |
| const Solve< SparseQR, Rhs > | solve (const SparseMatrixBase< Rhs > &B) const |
| |
| ComputationInfo | info () const |
| | Reports whether previous computation was successful.
|
| |
|
void | _sort_matrix_Q () |
| |
|
| SparseSolverBase () |
| | Default constructor.
|
| |
|
SparseQR< _MatrixType, _OrderingType > & | derived () |
| |
|
const SparseQR< _MatrixType, _OrderingType > & | derived () const |
| |
| const Solve< SparseQR< _MatrixType, _OrderingType >, Rhs > | solve (const MatrixBase< Rhs > &b) const |
| |
| const Solve< SparseQR< _MatrixType, _OrderingType >, Rhs > | solve (const SparseMatrixBase< Rhs > &b) const |
| |
|
void | _solve_impl (const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const |
| |
Sparse left-looking QR factorization with numerical column pivoting.
This class implements a left-looking QR decomposition of sparse matrices with numerical column pivoting. When a column has a norm less than a given tolerance it is implicitly permuted to the end. The QR factorization thus obtained is given by A*P = Q*R where R is upper triangular or trapezoidal.
P is the column permutation which is the product of the fill-reducing and the numerical permutations. Use colsPermutation() to get it.
Q is the orthogonal matrix represented as products of Householder reflectors. Use matrixQ() to get an expression and matrixQ().adjoint() to get the adjoint. You can then apply it to a vector.
R is the sparse triangular or trapezoidal matrix. The later occurs when A is rank-deficient. matrixR().topLeftCorner(rank(), rank()) always returns a triangular factor of full rank.
- Template Parameters
-
| _MatrixType | The type of the sparse matrix A, must be a column-major SparseMatrix<> |
| _OrderingType | The fill-reducing ordering method. See the OrderingMethods module for the list of built-in and external ordering methods. |
\implsparsesolverconcept
The numerical pivoting strategy and default threshold are the same as in SuiteSparse QR, and detailed in the following paper: Tim Davis, "Algorithm 915, SuiteSparseQR: Multifrontal Multithreaded Rank-Revealing
Sparse QR Factorization", ACM Trans. on Math. Soft. 38(1), 2011. Even though it is qualified as "rank-revealing", this strategy might fail for some rank deficient problems. When this class is used to solve linear or least-square problems it is thus strongly recommended to check the accuracy of the computed solution. If it failed, it usually helps to increase the threshold with setPivotThreshold.
- Warning
- The input sparse matrix A must be in compressed mode (see SparseMatrix::makeCompressed()).
-
For complex matrices matrixQ().transpose() will actually return the adjoint matrix.