Discussion:
[eigen] Sparse Matrix with block sparsity pattern
Justin Carpentier
2017-12-15 09:37:43 UTC
Permalink
Hi Eigen's users,

I'm currently looking for a C++ implementation of Sparse Matrices with a
generic Block Sparse pattern, compatible or inspired from the Eigen library.
What I mean by Block Sparse pattern is that each non-zero element
belongs to a non-zero block of a given dimension. In other words, the
sparsity is not element-wise but much more block-wise.

Is someone has any idea of such existing implementation?

Best,

Justin
Tim Rakowski
2017-12-15 10:29:59 UTC
Permalink
Hi Justin,

g2o has an implementation: https://github.com/RainerKuemmerle/g2o

Take a look at class BlockSolver in
https://github.com/RainerKuemmerle/g2o/blob/master/g2o/core/block_solver.h.

Regards,
Tim
Post by Justin Carpentier
Hi Eigen's users,
I'm currently looking for a C++ implementation of Sparse Matrices with a
generic Block Sparse pattern, compatible or inspired from the Eigen library.
What I mean by Block Sparse pattern is that each non-zero element
belongs to a non-zero block of a given dimension. In other words, the
sparsity is not element-wise but much more block-wise.
Is someone has any idea of such existing implementation?
Best,
Justin
Gael Guennebaud
2017-12-15 13:05:26 UTC
Permalink
Hi,

the implementation in g2o does not seems to be very efficient memory-wise
unless blocks are statically allocated, and even in this case there is a
lot of redundancy. Some years ago we started an implementation where you
define the block sizes along the row/column dimensions and then the
non-zeros are packed as in a SparseMatrix:

https://bitbucket.org/eigen/eigen/src/5c43a259f0b51963a00dd85e941a1fd044ac1cf4/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h

IIRC, even though it is not completely finished, it supports matrix-vector
products and thus iterative solvers, but I did not checked for a while....

gael
Post by Tim Rakowski
Hi Justin,
g2o has an implementation: https://github.com/RainerKuemmerle/g2o
Take a look at class BlockSolver in https://github.com/
RainerKuemmerle/g2o/blob/master/g2o/core/block_solver.h.
Regards,
Tim
Post by Justin Carpentier
Hi Eigen's users,
I'm currently looking for a C++ implementation of Sparse Matrices with a
generic Block Sparse pattern, compatible or inspired from the Eigen library.
What I mean by Block Sparse pattern is that each non-zero element
belongs to a non-zero block of a given dimension. In other words, the
sparsity is not element-wise but much more block-wise.
Is someone has any idea of such existing implementation?
Best,
Justin
Loading...