New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 1258 - Map<SparseMatrix>.coeffRef() compilation failure
Summary: Map<SparseMatrix>.coeffRef() compilation failure
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Compilation Problem
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-25 21:01 UTC by João Rui Leal
Modified: 2016-07-26 07:39 UTC (History)
2 users (show)



Attachments

Description João Rui Leal 2016-07-25 21:01:25 UTC
There is an incorrect pointer type in Map<SparseMatrix>.coeffRef().

It will not compile:
Map<SparseMatrix<type>> mat(m,n);
mat.coeffRef(i,j) = y;

The line in SparseMapBase::coeffRef(Index row, Index col):

Index* r = std::lower_bound(&Base::m_innerIndices[start],&Base::m_innerIndices[end],inner);

should be

StorageIndex* r = std::lower_bound(&Base::m_innerIndices[start],&Base::m_innerIndices[end],inner);
Comment 1 Gael Guennebaud 2016-07-26 07:39:11 UTC
Thanks for the report. Fixed:
https://bitbucket.org/eigen/eigen/commits/2a78248cf879/
Summary:     Bug 1258: fix compilation of Map<SparseMatrix>::coeffRef

Note You need to log in before you can comment on or make changes to this bug.