diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-12-10 22:53:31 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-12-10 22:53:31 +0100 |
commit | 594fd2d11d49fc3d84065de911ea25e88cb90d1c (patch) | |
tree | e8ca05abaa852a190a8ae341cd82ecaa898c2622 /Eigen/src/CholmodSupport | |
parent | 9d7d6348971da663a83dabc8fdb67a7e495655ee (diff) |
Cholmod: add support for uncompressed SparseMatrix objects
Diffstat (limited to 'Eigen/src/CholmodSupport')
-rw-r--r-- | Eigen/src/CholmodSupport/CholmodSupport.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Eigen/src/CholmodSupport/CholmodSupport.h b/Eigen/src/CholmodSupport/CholmodSupport.h index 5a7dc1b13..38f2ae3d5 100644 --- a/Eigen/src/CholmodSupport/CholmodSupport.h +++ b/Eigen/src/CholmodSupport/CholmodSupport.h @@ -73,7 +73,16 @@ cholmod_sparse viewAsCholmod(SparseMatrix<_Scalar,_Options,_Index>& mat) res.i = mat.innerIndexPtr(); res.x = mat.valuePtr(); res.sorted = 1; - res.packed = 1; + if(mat.compressed()) + { + res.packed = 1; + } + else + { + res.packed = 0; + res.nz = mat.innerNonZeroPtr(); + } + res.dtype = 0; res.stype = -1; @@ -161,6 +170,8 @@ enum CholmodMode { * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower * or Upper. Default is Lower. * + * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or uncompressed. + * * \sa \ref TutorialSparseDirectSolvers */ template<typename _MatrixType, int _UpLo = Lower> |