Registered Member
|
How do I add sparse and dense matrices? I tried it and it doesnt work
The above does not compile T_T |
Registered Member
|
One issue is that you are mixing complex and real matrices. But even if all matrices are real, the operation sparse matrix + dense matrix does not seem to compile, though http://eigen.tuxfamily.org/dox/group__T ... tml#title5 says that it should. This looks like a bug to me.
In the meantime, you can convert the sparse matrix to a dense matrix with .toDense(). Explicitly, the following should work:
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]