From 6c68f1d7876e5e709bebf5441fbb9606efea4640 Mon Sep 17 00:00:00 2001 From: Desire NUENTSA Date: Mon, 11 Mar 2013 19:21:18 +0100 Subject: [PATCH] bug #563 : Sparse block assignments should be called on compressed matrices. Uncompressed matrices will be supported later --- Eigen/src/SparseCore/SparseBlock.h | 1 + 1 file changed, 1 insertion(+) 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 inline BlockType& operator=(const SparseMatrixBase& other) { + eigen_assert(m_matrix.isCompressed() && " THE MATRIX SHOULD BE IN COMPRESSED MODE. PLEASE CALL makeCompressed()"); typedef typename internal::remove_all::type _NestedMatrixType; _NestedMatrixType& matrix = const_cast<_NestedMatrixType&>(m_matrix);; // This assignement is slow if this vector set is not empty