fix compilation of sparse_basic for DynamicSparseMatrix

This commit is contained in:
Gael Guennebaud
2010-12-09 19:39:15 +01:00
parent aec0782719
commit 0b32c5bdda
2 changed files with 16 additions and 1 deletions

View File

@@ -122,6 +122,14 @@ template<typename MatrixType, unsigned int UpLo> class SparseSelfAdjointView
internal::permute_symm_to_fullsymm<UpLo>(m_matrix, _dest);
}
template<typename DestScalar> void evalTo(DynamicSparseMatrix<DestScalar>& _dest) const
{
// TODO directly evaluate into _dest;
SparseMatrix<DestScalar> tmp(_dest.rows(),_dest.cols());
internal::permute_symm_to_fullsymm<UpLo>(m_matrix, tmp);
_dest = tmp;
}
/** \returns an expression of P^-1 H P */
SparseSymmetricPermutationProduct<_MatrixTypeNested,UpLo> twistedBy(const PermutationMatrix<Dynamic>& perm) const
{
@@ -291,7 +299,7 @@ void permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix<typename Matri
Dest& dest(_dest.derived());
enum {
StorageOrderMatch = Dest::IsRowMajor == MatrixType::IsRowMajor
StorageOrderMatch = int(Dest::IsRowMajor) == int(MatrixType::IsRowMajor)
};
eigen_assert(perm==0);
Index size = mat.rows();