fix various Taucs and Cholmod issues (they have not been tested for a while)
diff --git a/Eigen/src/Sparse/CholmodSupport.h b/Eigen/src/Sparse/CholmodSupport.h
index d666fa1..3a95b22 100644
--- a/Eigen/src/Sparse/CholmodSupport.h
+++ b/Eigen/src/Sparse/CholmodSupport.h
@@ -108,7 +108,7 @@
}
template<typename Scalar, int Flags>
-MappedSparseMatrix<Scalar,Flags>::MappedSparseMatrix(taucs_ccs_matrix& taucsMat)
+MappedSparseMatrix<Scalar,Flags>::MappedSparseMatrix(cholmod_sparse& cm)
{
m_innerSize = cm.nrow;
m_outerSize = cm.ncol;
@@ -205,7 +205,7 @@
ei_assert(!(m_status & SupernodalFactorIsDirty));
cholmod_sparse* cmRes = cholmod_factor_to_sparse(m_cholmodFactor, &m_cholmod);
- const_cast<typename Base::CholMatrixType&>(m_matrix) = Base::CholMatrixType::Map(*cmRes);
+ const_cast<typename Base::CholMatrixType&>(m_matrix) = MappedSparseMatrix(*cmRes);
free(cmRes);
m_status = (m_status & ~MatrixLIsDirty);
diff --git a/Eigen/src/Sparse/TaucsSupport.h b/Eigen/src/Sparse/TaucsSupport.h
index 375d29f..c866534 100644
--- a/Eigen/src/Sparse/TaucsSupport.h
+++ b/Eigen/src/Sparse/TaucsSupport.h
@@ -32,9 +32,9 @@
res.n = cols();
res.m = rows();
res.flags = 0;
- res.colptr = _outerIndexPtr();
- res.rowind = _innerIndexPtr();
- res.values.v = _valuePtr();
+ res.colptr = derived()._outerIndexPtr();
+ res.rowind = derived()._innerIndexPtr();
+ res.values.v = derived()._valuePtr();
if (ei_is_same_type<Scalar,int>::ret)
res.flags |= TAUCS_INT;
else if (ei_is_same_type<Scalar,float>::ret)
@@ -129,7 +129,7 @@
{
taucs_ccs_matrix taucsMatA = const_cast<MatrixType&>(a).asTaucsMatrix();
taucs_ccs_matrix* taucsRes = taucs_ccs_factor_llt(&taucsMatA, Base::m_precision, 0);
- m_matrix = Base::CholMatrixType::Map(*taucsRes);
+ m_matrix = MappedSparseMatrix(*taucsRes);
free(taucsRes);
m_status = (m_status & ~(CompleteFactorization|MatrixLIsDirty))
| IncompleteFactorization
@@ -161,7 +161,7 @@
ei_assert(!(m_status & SupernodalFactorIsDirty));
taucs_ccs_matrix* taucsL = taucs_supernodal_factor_to_ccs(m_taucsSupernodalFactor);
- const_cast<typename Base::CholMatrixType&>(m_matrix) = Base::CholMatrixType::Map(*taucsL);
+ const_cast<typename Base::CholMatrixType&>(m_matrix) = MappedSparseMatrix(*taucsL);
free(taucsL);
m_status = (m_status & ~MatrixLIsDirty);
}