This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Clearing row/column in DynamicSparseMatrix

Tags: None
(comma "," separated)
christopherbatty
Registered Member
Posts
8
Karma
0
OS
Is there any way to zero out a row or column of a DynamicSparseMatrix (depending on whether the matrix is stored in row or column major format)?
Presumably this should be a fairly efficient operation, since it just amounts to clearing the SparseVector for the given row.
christopherbatty
Registered Member
Posts
8
Karma
0
OS
Similarly, is there a way to erase an element from the matrix?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Indeed that does not seem to be easily doable at the moment. Probably because that's not common to want to suppress elements. If you are incrementally updating an assembled problem, perhaps it is better to start from a fresh matrix and copy what can be copied from the previous one... ??
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
btw, you are right in saying that would be very easy to implement. So feel free to add an entry in the bugtracker so that we don't forget about this feature (http://eigen.tuxfamily.org/bz/), and you could even propose a patch ;)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora