This bugzilla service is closed. All entries have been migrated to

Bug 305

Summary: .block() not implemented for sparse matrices
Product: Eigen Reporter: carsten.neff
Component: SparseAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: enhancement CC: gael.guennebaud, henzlers, krishkanth.92, raffael
Priority: ---    
Version: 3.0   
Hardware: All   
OS: All   
Description Flags
Code to reproduce problem
minimal example main.cpp file for sparse matrix block assignment none

Description carsten.neff 2011-06-24 11:35:56 UTC
currently it is not possible to access a sub matrix 
of a sparse matrix via .block().
Comment 1 Alexander Werner 2013-07-19 12:05:33 UTC
Created attachment 370 [details]
Code to reproduce problem

Add an incomplete list of test cases which still fail with
their dense counterparts.
Comment 2 henzlers 2015-10-19 17:49:04 UTC
Created attachment 616 [details]
minimal example main.cpp file for sparse matrix block assignment

The bug is still active. I can not assign a part of a sparse block matrix with another sparse matrix (see MWE attached).
Comment 3 Krishna Kanth Nakka 2016-02-03 05:16:40 UTC
Is this availble in the current version?
Comment 4 Krishna Kanth Nakka 2016-02-03 05:40:59 UTC
Comment on attachment 370 [details]
Code to reproduce problem

Hi werner,

Were u able to solve the problem of assigning sparse block matrices..
Comment 5 Gael Guennebaud 2016-02-03 14:06:18 UTC
To make it clear:

For a column-major matrix, you can only write to col(), middleCols() and for a row-major matrix to row(),middleRows(). And in general innerVector() and innerVectors() are always writeable.
Comment 6 raffael casagrande 2016-04-19 16:11:39 UTC
So are you saying that the block() routine will not be implemented for sparse matrices?
Btw. I noticed that also the topLeftCorner, topRightCorner(),... etc. functions fail for sparse matrices.
Comment 7 Gael Guennebaud 2016-04-25 14:36:08 UTC
It will be implemented in the future as soon as someone step in to implement an efficient solution.
Comment 8 Nobody 2019-12-04 10:55:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: