Registered Member
|
Hello,
in the current development version of Eigen the documentation says that Eigen::SparseMatrixBase contrains implementations of blocks which are non-const. Why does the following code fail to compile:
with the error messages:
|
Moderator
|
oh, then maybe the documentation has to be clarified. Only special blocks are writeable. This includes .col(), .leftCols(), .middleCols(), .rightCols() for a column major matrix and the row versions for a row major matrix. This limitation is to prevent writing completely inefficient code.
|
Registered Member
|
I see and understand. Just my two cents:
(1) Even though the performance critical part of my code uses SparseMatrix in a read-only manner, an easy initialization of this matrix is not straight forward. (2) It would be very desirable to have a clearly defined common interface to sparse and dense matrices. This is especially useful in templated code which can otherwise be seamlessly switched from Dense to Sparse. Alex |
Moderator
|
yes, I kind of agree with you and we are moving slowly towards this goal.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]