bug #563 : Sparse block assignments should be called on compressed matrices. Uncompressed matrices will be supported later

This commit is contained in:
Desire NUENTSA 2013-03-11 19:21:18 +01:00
parent 79f93247c5
commit 6c68f1d787

View File

@ -119,6 +119,7 @@ public:
template<typename OtherDerived>
inline BlockType& operator=(const SparseMatrixBase<OtherDerived>& other)
{
eigen_assert(m_matrix.isCompressed() && " THE MATRIX SHOULD BE IN COMPRESSED MODE. PLEASE CALL makeCompressed()");
typedef typename internal::remove_all<typename SparseMatrixType::Nested>::type _NestedMatrixType;
_NestedMatrixType& matrix = const_cast<_NestedMatrixType&>(m_matrix);;
// This assignement is slow if this vector set is not empty