Eigen  5.0.1
 
Loading...
Searching...
No Matches
Eigen::SPQR< MatrixType_ > Class Template Reference

#include <Eigen/src/SPQRSupport/SuiteSparseQRSupport.h>

Detailed Description

template<typename MatrixType_>
class Eigen::SPQR< MatrixType_ >

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 least-squares 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 matrixR() to get it as SparseMatrix. NOTE : The storage index type of R is always SuiteSparse_long. You can get it with SPQR::StorageIndex

Template Parameters
MatrixType_The type of the sparse matrix A, must be a column-major SparseMatrix<>

This class follows the sparse solver concept .

+ Inheritance diagram for Eigen::SPQR< MatrixType_ >:

Public Member Functions

cholmod_common * cholmodCommon () const
 
Index cols () const
 
PermutationType colsPermutation () const
 Get the permutation that was applied to columns of A.
 
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.
 
- Public Member Functions inherited from Eigen::SparseSolverBase< SPQR< MatrixType_ > >
Solve< SPQR< MatrixType_ >, Rhs > solve (const MatrixBase< Rhs > &b) const
 
Solve< SPQR< MatrixType_ >, Rhs > solve (const MatrixBase< Rhs > &b) const
 
Solve< SPQR< MatrixType_ >, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
Solve< SPQR< MatrixType_ >, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
 SparseSolverBase ()=default
 
 SparseSolverBase ()=default
 

Member Function Documentation

◆ cholmodCommon()

template<typename MatrixType_>
cholmod_common * Eigen::SPQR< MatrixType_ >::cholmodCommon ( ) const
inline
Returns
a pointer to the SPQR workspace

◆ cols()

template<typename MatrixType_>
Index Eigen::SPQR< MatrixType_ >::cols ( ) const
inline

Get the number of columns of the input matrix.

◆ info()

template<typename MatrixType_>
ComputationInfo Eigen::SPQR< MatrixType_ >::info ( ) const
inline

Reports whether previous computation was successful.

Returns
Success if computation was successful, NumericalIssue if the sparse QR can not be computed

◆ matrixR()

template<typename MatrixType_>
const MatrixType & Eigen::SPQR< MatrixType_ >::matrixR ( ) const
inline
Returns
the sparse triangular factor R. It is a sparse matrix

◆ rank()

template<typename MatrixType_>
Index Eigen::SPQR< MatrixType_ >::rank ( ) const
inline

Gets the rank of the matrix. It should be equal to matrixR().rows() if the matrix is full-rank; matrixR().cols() is always the number of columns of the input matrix.

◆ rows()

template<typename MatrixType_>
Index Eigen::SPQR< MatrixType_ >::rows ( ) const
inline

Get the number of rows of the input matrix and the Q matrix


The documentation for this class was generated from the following file: