fix issue 135 (SparseBlock::operator= for SparseMatrix)

This commit is contained in:
Gael Guennebaud
2010-06-14 16:26:33 +02:00
parent 2d65f5d3cd
commit 3cabd0c417
2 changed files with 70 additions and 12 deletions

View File

@@ -74,6 +74,7 @@ class SparseMatrix
typedef MappedSparseMatrix<Scalar,Flags> Map;
using Base::IsRowMajor;
typedef CompressedStorage<Scalar,Index> Storage;
protected:
@@ -102,6 +103,9 @@ class SparseMatrix
inline const Index* _outerIndexPtr() const { return m_outerIndex; }
inline Index* _outerIndexPtr() { return m_outerIndex; }
inline Storage& data() { return m_data; }
inline const Storage& data() const { return m_data; }
inline Scalar coeff(Index row, Index col) const
{
const Index outer = IsRowMajor ? row : col;