diff options
-rw-r--r-- | Eigen/src/SparseCore/SparseBlock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Eigen/src/SparseCore/SparseBlock.h b/Eigen/src/SparseCore/SparseBlock.h index f50fb66ea..36c281210 100644 --- a/Eigen/src/SparseCore/SparseBlock.h +++ b/Eigen/src/SparseCore/SparseBlock.h @@ -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 |