aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/UmfPackSupport
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-12-02 13:57:13 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-12-02 13:57:13 +0100
commit1a8dc8514257cb931b1b5bca67004fa2b628133d (patch)
tree99d8ba42720fd6f2c36dadc3861115b4eeae42cb /Eigen/src/UmfPackSupport
parent4974d1d2b4d5f311dea1021d4fb0130ab82efc5e (diff)
bug #897: fix UmfPack usage with mapped sparse matrices
Diffstat (limited to 'Eigen/src/UmfPackSupport')
-rw-r--r--Eigen/src/UmfPackSupport/UmfPackSupport.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Eigen/src/UmfPackSupport/UmfPackSupport.h b/Eigen/src/UmfPackSupport/UmfPackSupport.h
index 1dc7ddba0..29ee516d9 100644
--- a/Eigen/src/UmfPackSupport/UmfPackSupport.h
+++ b/Eigen/src/UmfPackSupport/UmfPackSupport.h
@@ -196,7 +196,8 @@ class UmfPackLU : public SparseSolverBase<UmfPackLU<_MatrixType> >
* Note that the matrix should be column-major, and in compressed format for best performance.
* \sa SparseMatrix::makeCompressed().
*/
- void compute(const MatrixType& matrix)
+ template<typename InputMatrixType>
+ void compute(const InputMatrixType& matrix)
{
analyzePattern(matrix);
factorize(matrix);
@@ -208,7 +209,8 @@ class UmfPackLU : public SparseSolverBase<UmfPackLU<_MatrixType> >
*
* \sa factorize(), compute()
*/
- void analyzePattern(const MatrixType& matrix)
+ template<typename InputMatrixType>
+ void analyzePattern(const InputMatrixType& matrix)
{
if(m_symbolic)
umfpack_free_symbolic(&m_symbolic,Scalar());
@@ -234,7 +236,8 @@ class UmfPackLU : public SparseSolverBase<UmfPackLU<_MatrixType> >
*
* \sa analyzePattern(), compute()
*/
- void factorize(const MatrixType& matrix)
+ template<typename InputMatrixType>
+ void factorize(const InputMatrixType& matrix)
{
eigen_assert(m_analysisIsOk && "UmfPackLU: you must first call analyzePattern()");
if(m_numeric)
@@ -276,7 +279,8 @@ class UmfPackLU : public SparseSolverBase<UmfPackLU<_MatrixType> >
m_extractedDataAreDirty = true;
}
- void grapInput(const MatrixType& mat)
+ template<typename InputMatrixType>
+ void grapInput(const InputMatrixType& mat)
{
m_copyMatrix.resize(mat.rows(), mat.cols());
if( ((MatrixType::Flags&RowMajorBit)==RowMajorBit) || sizeof(typename MatrixType::Index)!=sizeof(int) || !mat.isCompressed() )