mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 20:26:03 +08:00
Pass a const matrix to sparseQR
This commit is contained in:
parent
33febdb48b
commit
121f3bdf04
@ -79,13 +79,13 @@ class SparseQR
|
|||||||
{
|
{
|
||||||
compute(mat);
|
compute(mat);
|
||||||
}
|
}
|
||||||
void compute(/*const*/ MatrixType& mat)
|
void compute(const MatrixType& mat)
|
||||||
{
|
{
|
||||||
analyzePattern(mat);
|
analyzePattern(mat);
|
||||||
factorize(mat);
|
factorize(mat);
|
||||||
}
|
}
|
||||||
void analyzePattern(const MatrixType& mat);
|
void analyzePattern(const MatrixType& mat);
|
||||||
void factorize(/*const*/ MatrixType& mat);
|
void factorize(const MatrixType& mat);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of rows of the triangular matrix.
|
* Get the number of rows of the triangular matrix.
|
||||||
@ -223,7 +223,7 @@ void SparseQR<MatrixType,OrderingType>::analyzePattern(const MatrixType& mat)
|
|||||||
* \param mat The sparse column-major matrix
|
* \param mat The sparse column-major matrix
|
||||||
*/
|
*/
|
||||||
template <typename MatrixType, typename OrderingType>
|
template <typename MatrixType, typename OrderingType>
|
||||||
void SparseQR<MatrixType,OrderingType>::factorize(MatrixType& mat)
|
void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
|
||||||
{
|
{
|
||||||
eigen_assert(m_analysisIsok && "analyzePattern() should be called before this step");
|
eigen_assert(m_analysisIsok && "analyzePattern() should be called before this step");
|
||||||
Index m = mat.rows();
|
Index m = mat.rows();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user