Registered Member
|
Hi all,
I have been looking into how I can define sparsity patterns of matrices. Lets say I have a matrix (matlab-ish syntax)
Is it possible to instruct Eigen to not use all the 0s in this matrix? I am using Eigen on an embedded system, and would need to really remove all operations in the generated code that will access 0 elements. Thanks! |
Registered Member
|
I have been testing some different approaches, and if I manually write out the block operations I get the expected result.
However, the sparse matrix representation seems only to support row/column vectors, not block/diagonal block-sparsity. Are there ways to automatically generate, perhaps through customising a matrix type, the block operations? Give Eigen knowledge about the structure in a dense matrix. Edit: For example, how CVXGEN (http://cvxgen.com/) specifies its sparse matrices is quite intuitive and generates the minimal set of memory and operations needed. Though I do not think it can be lifted like that into C++, it shows the usage case quite well. |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]