Registered Member
|
How to assign a sparse matrix in Eigen?
How to assign individual elements of A? Thanks |
Moderator
|
it's explained there: http://eigen.tuxfamily.org/dox-devel/Tu ... rseFilling
|
Registered Member
|
Unfortunately, I do not understand what it does. Can you give me an example? For instance, how should I assign the following 10 by 8 sparse matrix? A(1,2) = 3; A(1,4) = 10; A(2,1) = 9; A(2,8) = 9; A(4,7) = 11; A(7,4) = 21; A(9,3) = 45; A(10,7) = 76; |
Registered Member
|
You can simply use:
But it would be slow, or you can create a a sparse matrix from triplets, such as the example after the "Here is a typical usage example: " in ggael's link. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]