![]() |
Prusa Slicer 2.6.0
|
Sparse left-looking rank-revealing QR factorization. More...
#include <src/eigen/Eigen/src/SparseQR/SparseQR.h>
Inheritance diagram for Eigen::SparseQR< _MatrixType, _OrderingType >:
Collaboration diagram for Eigen::SparseQR< _MatrixType, _OrderingType >:Public Types | |
| enum | { ColsAtCompileTime = MatrixType::ColsAtCompileTime , MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime } |
| typedef _MatrixType | MatrixType |
| typedef _OrderingType | OrderingType |
| typedef MatrixType::Scalar | Scalar |
| typedef MatrixType::RealScalar | RealScalar |
| typedef MatrixType::StorageIndex | StorageIndex |
| typedef SparseMatrix< Scalar, ColMajor, StorageIndex > | QRMatrixType |
| typedef Matrix< StorageIndex, Dynamic, 1 > | IndexVector |
| typedef Matrix< Scalar, Dynamic, 1 > | ScalarVector |
| typedef PermutationMatrix< Dynamic, Dynamic, StorageIndex > | PermutationType |
Public Member Functions | |
| SparseQR () | |
| SparseQR (const MatrixType &mat) | |
| void | compute (const MatrixType &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) |
| 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 () |
| SparseQR< _MatrixType, _OrderingType > & | derived () |
| const SparseQR< _MatrixType, _OrderingType > & | derived () const |
| void | _solve_impl (const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const |
Protected Types | |
| typedef SparseSolverBase< SparseQR< _MatrixType, _OrderingType > > | Base |
Protected Attributes | |
| bool | m_analysisIsok |
| bool | m_factorizationIsok |
| ComputationInfo | m_info |
| std::string | m_lastError |
| QRMatrixType | m_pmat |
| QRMatrixType | m_R |
| QRMatrixType | m_Q |
| ScalarVector | m_hcoeffs |
| PermutationType | m_perm_c |
| PermutationType | m_pivotperm |
| PermutationType | m_outputPerm_c |
| RealScalar | m_threshold |
| bool | m_useDefaultThreshold |
| Index | m_nonzeropivots |
| IndexVector | m_etree |
| IndexVector | m_firstRowElt |
| bool | m_isQSorted |
| bool | m_isEtreeOk |
| bool | m_isInitialized |
Friends | |
| template<typename , typename > | |
| struct | SparseQR_QProduct |
Sparse left-looking rank-revealing QR factorization.
This class implements a left-looking rank-revealing QR decomposition of sparse matrices. 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 rank-revealing 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.
| _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
|
protected |
| typedef Matrix<StorageIndex, Dynamic, 1> Eigen::SparseQR< _MatrixType, _OrderingType >::IndexVector |
| typedef _MatrixType Eigen::SparseQR< _MatrixType, _OrderingType >::MatrixType |
| typedef _OrderingType Eigen::SparseQR< _MatrixType, _OrderingType >::OrderingType |
| typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> Eigen::SparseQR< _MatrixType, _OrderingType >::PermutationType |
| typedef SparseMatrix<Scalar,ColMajor,StorageIndex> Eigen::SparseQR< _MatrixType, _OrderingType >::QRMatrixType |
| typedef MatrixType::RealScalar Eigen::SparseQR< _MatrixType, _OrderingType >::RealScalar |
| typedef MatrixType::Scalar Eigen::SparseQR< _MatrixType, _OrderingType >::Scalar |
| typedef Matrix<Scalar, Dynamic, 1> Eigen::SparseQR< _MatrixType, _OrderingType >::ScalarVector |
| typedef MatrixType::StorageIndex Eigen::SparseQR< _MatrixType, _OrderingType >::StorageIndex |
| anonymous enum |
| Enumerator | |
|---|---|
| ColsAtCompileTime | |
| MaxColsAtCompileTime | |
|
inline |
|
inlineexplicit |
Construct a QR factorization of the matrix mat.
References Eigen::SparseQR< _MatrixType, _OrderingType >::compute().
Here is the call graph for this function:
|
inline |
References Eigen::SparseQR< _MatrixType, _OrderingType >::cols(), Eigen::SparseQR< _MatrixType, _OrderingType >::colsPermutation(), eigen_assert, Eigen::SparseQR< _MatrixType, _OrderingType >::m_info, Eigen::SparseSolverBase< SparseQR< _MatrixType, _OrderingType > >::m_isInitialized, Eigen::SparseQR< _MatrixType, _OrderingType >::m_perm_c, Eigen::SparseQR< _MatrixType, _OrderingType >::matrixQ(), Eigen::SparseQR< _MatrixType, _OrderingType >::matrixR(), Eigen::SparseQR< _MatrixType, _OrderingType >::rank(), Eigen::SparseQR< _MatrixType, _OrderingType >::rows(), Eigen::PermutationBase< Derived >::size(), and Eigen::Success.
Here is the call graph for this function:
|
inlineinherited |
|
inline |
References Eigen::SparseQR< _MatrixType, _OrderingType >::m_isQSorted, and Eigen::SparseQR< _MatrixType, _OrderingType >::m_Q.
| void Eigen::SparseQR< MatrixType, OrderingType >::analyzePattern | ( | const MatrixType & | mat | ) |
Preprocessing step of a QR factorization.
In this step, the fill-reducing permutation is computed and applied to the columns of A and the column elimination tree is computed as well. Only the sparsity pattern of mat is exploited.
References Eigen::internal::coletree(), and eigen_assert.
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::compute().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::cols(), and Eigen::SparseQR< _MatrixType, _OrderingType >::m_pmat.
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::_solve_impl().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References eigen_assert, Eigen::SparseSolverBase< SparseQR< _MatrixType, _OrderingType > >::m_isInitialized, and Eigen::SparseQR< _MatrixType, _OrderingType >::m_outputPerm_c.
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::_solve_impl().
Here is the caller graph for this function:
|
inline |
Computes the QR factorization of the sparse matrix mat.
References Eigen::SparseQR< _MatrixType, _OrderingType >::analyzePattern(), and Eigen::SparseQR< _MatrixType, _OrderingType >::factorize().
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::SparseQR().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
|
inlineinherited |
| void Eigen::SparseQR< MatrixType, OrderingType >::factorize | ( | const MatrixType & | mat | ) |
Performs the numerical QR factorization of the input matrix.
The function SparseQR::analyzePattern(const MatrixType&) must have been called beforehand with a matrix having the same sparsity pattern than mat.
| mat | The sparse column-major matrix |
References col(), Eigen::internal::coletree(), Eigen::PlainObjectBase< Derived >::data(), eigen_assert, Eigen::InvalidInput, Eigen::numext::maxi(), Eigen::PlainObjectBase< Derived >::setConstant(), Eigen::PlainObjectBase< Derived >::setZero(), sqrt(), and Eigen::Success.
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::compute().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Reports whether previous computation was successful.
Success if computation was successful, NumericalIssue if the QR factorization reports a numerical problem InvalidInput if the input matrix is invalidReferences eigen_assert, Eigen::SparseQR< _MatrixType, _OrderingType >::m_info, and Eigen::SparseSolverBase< SparseQR< _MatrixType, _OrderingType > >::m_isInitialized.
|
inline |
References Eigen::SparseQR< _MatrixType, _OrderingType >::m_lastError.
|
inline |
To get a plain SparseMatrix representation of Q:
Internally, this call simply performs a sparse product between the matrix Q and a sparse identity matrix. However, due to the fact that the sparse reflectors are stored unsorted, two transpositions are needed to sort them before performing the product.
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::_solve_impl().
Here is the caller graph for this function:
|
inline |
To sort the entries, you can assign it to a row-major matrix, and if a column-major matrix is required, you can copy it again:
References Eigen::SparseQR< _MatrixType, _OrderingType >::m_R.
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::_solve_impl().
Here is the caller graph for this function:
|
inline |
References eigen_assert, Eigen::SparseSolverBase< SparseQR< _MatrixType, _OrderingType > >::m_isInitialized, and Eigen::SparseQR< _MatrixType, _OrderingType >::m_nonzeropivots.
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::_solve_impl().
Here is the caller graph for this function:
|
inline |
References Eigen::SparseQR< _MatrixType, _OrderingType >::m_pmat, and Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::rows().
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::_solve_impl(), Eigen::SparseQR< _MatrixType, _OrderingType >::solve(), and Eigen::SparseQR< _MatrixType, _OrderingType >::solve().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Sets the threshold that is used to determine linearly dependent columns during the factorization.
In practice, if during the factorization the norm of the column that has to be eliminated is below this threshold, then the entire column is treated as zero, and it is moved at the end.
References Eigen::SparseQR< _MatrixType, _OrderingType >::m_threshold, and Eigen::SparseQR< _MatrixType, _OrderingType >::m_useDefaultThreshold.
|
inline |
References eigen_assert, Eigen::SparseSolverBase< SparseQR< _MatrixType, _OrderingType > >::m_isInitialized, and Eigen::SparseQR< _MatrixType, _OrderingType >::rows().
Here is the call graph for this function:
|
inline |
References Eigen::SparseMatrixBase< Derived >::derived(), eigen_assert, Eigen::SparseSolverBase< SparseQR< _MatrixType, _OrderingType > >::m_isInitialized, Eigen::SparseMatrixBase< Derived >::rows(), and Eigen::SparseQR< _MatrixType, _OrderingType >::rows().
Here is the call graph for this function:
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotectedinherited |
|
protected |
|
protected |
|
protected |
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::rank().
|
protected |
|
protected |
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::_solve_impl().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by Eigen::SparseQR< _MatrixType, _OrderingType >::matrixR().
|
protected |
|
protected |