Sparse QR factorization based on SuiteSparseQR library. More...
#include <SuiteSparseQRSupport.h>
Public Types | |
typedef UF_long | Index |
typedef SparseMatrix< Scalar, ColMajor, Index > | MatrixType |
typedef PermutationMatrix < Dynamic, Dynamic > | PermutationType |
typedef _MatrixType::RealScalar | RealScalar |
typedef _MatrixType::Scalar | Scalar |
Public Member Functions | |
template<typename Rhs , typename Dest > | |
void | _solve (const MatrixBase< Rhs > &b, MatrixBase< Dest > &dest) const |
cholmod_common * | cholmodCommon () const |
Index | cols () const |
PermutationType | colsPermutation () const |
Get the permutation that was applied to columns of A. | |
void | compute (const _MatrixType &matrix) |
ComputationInfo | info () const |
Reports whether previous computation was successful. | |
SPQRMatrixQReturnType< SPQR > | matrixQ () const |
Get an expression of the matrix Q. | |
const MatrixType | matrixR () const |
Index | rank () const |
Index | rows () const |
void | setPivotThreshold (const RealScalar &tol) |
Set the tolerance tol to treat columns with 2-norm < =tol as zero. | |
void | setSPQROrdering (int ord) |
Set the fill-reducing ordering method to be used. | |
template<typename Rhs > | |
const internal::solve_retval < SPQR, Rhs > | solve (const MatrixBase< Rhs > &B) const |
SPQR () | |
SPQR (const _MatrixType &matrix) | |
void | SPQR_free () |
~SPQR () | |
Protected Attributes | |
int | m_allow_tol |
bool | m_analysisIsOk |
cholmod_common | m_cc |
cholmod_sparse * | m_cR |
Index * | m_E |
bool | m_factorizationIsOk |
cholmod_sparse * | m_H |
Index * | m_HPinv |
cholmod_dense * | m_HTau |
ComputationInfo | m_info |
bool | m_isInitialized |
bool | m_isRUpToDate |
int | m_ordering |
MatrixType | m_R |
Index | m_rank |
RealScalar | m_tolerance |
bool | m_useDefaultThreshold |
Friends | |
struct | SPQR_QProduct |
Sparse QR factorization based on SuiteSparseQR library.
This class is used to perform a multithreaded and multifrontal rank-revealing QR decomposition of sparse matrices. The result is then used to solve linear leasts_square systems. Clearly, a QR factorization is returned such that A*P = Q*R where :
P is the column permutation. Use colsPermutation() to get it.
Q is the orthogonal matrix represented as Householder reflectors. Use matrixQ() to get an expression and matrixQ().transpose() to get the transpose. You can then apply it to a vector.
R is the sparse triangular factor. Use matrixQR() to get it as SparseMatrix. NOTE : The Index type of R is always UF_long. You can get it with SPQR::Index
_MatrixType | The type of the sparse matrix A, must be a column-major SparseMatrix<> NOTE |
Definition at line 57 of file SuiteSparseQRSupport.h.
typedef UF_long Eigen::SPQR< _MatrixType >::Index |
Definition at line 62 of file SuiteSparseQRSupport.h.
typedef SparseMatrix<Scalar, ColMajor, Index> Eigen::SPQR< _MatrixType >::MatrixType |
Definition at line 63 of file SuiteSparseQRSupport.h.
typedef PermutationMatrix<Dynamic, Dynamic> Eigen::SPQR< _MatrixType >::PermutationType |
Definition at line 64 of file SuiteSparseQRSupport.h.
typedef _MatrixType::RealScalar Eigen::SPQR< _MatrixType >::RealScalar |
Definition at line 61 of file SuiteSparseQRSupport.h.
typedef _MatrixType::Scalar Eigen::SPQR< _MatrixType >::Scalar |
Definition at line 60 of file SuiteSparseQRSupport.h.
Eigen::SPQR< _MatrixType >::SPQR | ( | ) | [inline] |
Definition at line 66 of file SuiteSparseQRSupport.h.
Eigen::SPQR< _MatrixType >::SPQR | ( | const _MatrixType & | matrix | ) | [inline] |
Definition at line 72 of file SuiteSparseQRSupport.h.
Eigen::SPQR< _MatrixType >::~SPQR | ( | ) | [inline] |
Definition at line 79 of file SuiteSparseQRSupport.h.
void Eigen::SPQR< _MatrixType >::_solve | ( | const MatrixBase< Rhs > & | b, |
MatrixBase< Dest > & | dest | ||
) | const [inline] |
Definition at line 154 of file SuiteSparseQRSupport.h.
cholmod_common* Eigen::SPQR< _MatrixType >::cholmodCommon | ( | ) | const [inline] |
Definition at line 226 of file SuiteSparseQRSupport.h.
Index Eigen::SPQR< _MatrixType >::cols | ( | void | ) | const [inline] |
Get the number of columns of the input matrix.
Definition at line 138 of file SuiteSparseQRSupport.h.
PermutationType Eigen::SPQR< _MatrixType >::colsPermutation | ( | ) | const [inline] |
Get the permutation that was applied to columns of A.
Definition at line 198 of file SuiteSparseQRSupport.h.
void Eigen::SPQR< _MatrixType >::compute | ( | const _MatrixType & | matrix | ) | [inline] |
Definition at line 93 of file SuiteSparseQRSupport.h.
ComputationInfo Eigen::SPQR< _MatrixType >::info | ( | ) | const [inline] |
Reports whether previous computation was successful.
Success
if computation was succesful, NumericalIssue
if the sparse QR can not be computed Definition at line 234 of file SuiteSparseQRSupport.h.
SPQRMatrixQReturnType<SPQR> Eigen::SPQR< _MatrixType >::matrixQ | ( | void | ) | const [inline] |
Get an expression of the matrix Q.
Definition at line 193 of file SuiteSparseQRSupport.h.
const MatrixType Eigen::SPQR< _MatrixType >::matrixR | ( | void | ) | const [inline] |
Definition at line 183 of file SuiteSparseQRSupport.h.
Index Eigen::SPQR< _MatrixType >::rank | ( | ) | const [inline] |
Gets the rank of the matrix. It should be equal to matrixQR().cols if the matrix is full-rank
Definition at line 211 of file SuiteSparseQRSupport.h.
Index Eigen::SPQR< _MatrixType >::rows | ( | void | ) | const [inline] |
Get the number of rows of the input matrix and the Q matrix
Definition at line 133 of file SuiteSparseQRSupport.h.
void Eigen::SPQR< _MatrixType >::setPivotThreshold | ( | const RealScalar & | tol | ) | [inline] |
Set the tolerance tol to treat columns with 2-norm < =tol as zero.
Definition at line 219 of file SuiteSparseQRSupport.h.
void Eigen::SPQR< _MatrixType >::setSPQROrdering | ( | int | ord | ) | [inline] |
Set the fill-reducing ordering method to be used.
Definition at line 217 of file SuiteSparseQRSupport.h.
const internal::solve_retval<SPQR, Rhs> Eigen::SPQR< _MatrixType >::solve | ( | const MatrixBase< Rhs > & | B | ) | const [inline] |
Definition at line 145 of file SuiteSparseQRSupport.h.
void Eigen::SPQR< _MatrixType >::SPQR_free | ( | ) | [inline] |
Definition at line 84 of file SuiteSparseQRSupport.h.
friend struct SPQR_QProduct [friend] |
Definition at line 257 of file SuiteSparseQRSupport.h.
int Eigen::SPQR< _MatrixType >::m_allow_tol [protected] |
Definition at line 246 of file SuiteSparseQRSupport.h.
bool Eigen::SPQR< _MatrixType >::m_analysisIsOk [protected] |
Definition at line 241 of file SuiteSparseQRSupport.h.
cholmod_common Eigen::SPQR< _MatrixType >::m_cc [mutable, protected] |
Definition at line 255 of file SuiteSparseQRSupport.h.
cholmod_sparse* Eigen::SPQR< _MatrixType >::m_cR [mutable, protected] |
Definition at line 248 of file SuiteSparseQRSupport.h.
Index* Eigen::SPQR< _MatrixType >::m_E [mutable, protected] |
Definition at line 250 of file SuiteSparseQRSupport.h.
bool Eigen::SPQR< _MatrixType >::m_factorizationIsOk [protected] |
Definition at line 242 of file SuiteSparseQRSupport.h.
cholmod_sparse* Eigen::SPQR< _MatrixType >::m_H [mutable, protected] |
Definition at line 251 of file SuiteSparseQRSupport.h.
Index* Eigen::SPQR< _MatrixType >::m_HPinv [mutable, protected] |
Definition at line 252 of file SuiteSparseQRSupport.h.
cholmod_dense* Eigen::SPQR< _MatrixType >::m_HTau [mutable, protected] |
Definition at line 253 of file SuiteSparseQRSupport.h.
ComputationInfo Eigen::SPQR< _MatrixType >::m_info [mutable, protected] |
Definition at line 244 of file SuiteSparseQRSupport.h.
bool Eigen::SPQR< _MatrixType >::m_isInitialized [protected] |
Definition at line 240 of file SuiteSparseQRSupport.h.
bool Eigen::SPQR< _MatrixType >::m_isRUpToDate [mutable, protected] |
Definition at line 243 of file SuiteSparseQRSupport.h.
int Eigen::SPQR< _MatrixType >::m_ordering [protected] |
Definition at line 245 of file SuiteSparseQRSupport.h.
MatrixType Eigen::SPQR< _MatrixType >::m_R [mutable, protected] |
Definition at line 249 of file SuiteSparseQRSupport.h.
Index Eigen::SPQR< _MatrixType >::m_rank [mutable, protected] |
Definition at line 254 of file SuiteSparseQRSupport.h.
RealScalar Eigen::SPQR< _MatrixType >::m_tolerance [protected] |
Definition at line 247 of file SuiteSparseQRSupport.h.
bool Eigen::SPQR< _MatrixType >::m_useDefaultThreshold [protected] |
Definition at line 256 of file SuiteSparseQRSupport.h.