diff --git a/Eigen/src/Sparse/CholmodSupport.h b/Eigen/src/Sparse/CholmodSupport.h index d666fa1e9..3a95b2253 100644 --- a/Eigen/src/Sparse/CholmodSupport.h +++ b/Eigen/src/Sparse/CholmodSupport.h @@ -108,7 +108,7 @@ cholmod_dense ei_cholmod_map_eigen_to_dense(MatrixBase& mat) } template -MappedSparseMatrix::MappedSparseMatrix(taucs_ccs_matrix& taucsMat) +MappedSparseMatrix::MappedSparseMatrix(cholmod_sparse& cm) { m_innerSize = cm.nrow; m_outerSize = cm.ncol; @@ -205,7 +205,7 @@ SparseLLT::matrixL() const ei_assert(!(m_status & SupernodalFactorIsDirty)); cholmod_sparse* cmRes = cholmod_factor_to_sparse(m_cholmodFactor, &m_cholmod); - const_cast(m_matrix) = Base::CholMatrixType::Map(*cmRes); + const_cast(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 375d29f32..c8665349e 100644 --- a/Eigen/src/Sparse/TaucsSupport.h +++ b/Eigen/src/Sparse/TaucsSupport.h @@ -32,9 +32,9 @@ taucs_ccs_matrix SparseMatrixBase::asTaucsMatrix() 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::ret) res.flags |= TAUCS_INT; else if (ei_is_same_type::ret) @@ -129,7 +129,7 @@ void SparseLLT::compute(const MatrixType& a) { taucs_ccs_matrix taucsMatA = const_cast(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 @@ SparseLLT::matrixL() const ei_assert(!(m_status & SupernodalFactorIsDirty)); taucs_ccs_matrix* taucsL = taucs_supernodal_factor_to_ccs(m_taucsSupernodalFactor); - const_cast(m_matrix) = Base::CholMatrixType::Map(*taucsL); + const_cast(m_matrix) = MappedSparseMatrix(*taucsL); free(taucsL); m_status = (m_status & ~MatrixLIsDirty); }