This bugzilla service is closed. All entries have been migrated to
Bug 520 - DiagonalMatrix interface lacking
Summary: DiagonalMatrix interface lacking
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.2
Hardware: All All
: Normal enhancement
Assignee: Nobody
Depends on: ExprEval
Blocks: 610 3.x
  Show dependency treegraph
Reported: 2012-10-12 23:16 UTC by Bastiaan Ober
Modified: 2019-12-04 11:55 UTC (History)
3 users (show)


Description Bastiaan Ober 2012-10-12 23:16:23 UTC
The interface of the DiagonalMatrix lacks some methods that generic matrices do have. Examples I encountered are operator(row,col), setConstant, coeff, but there might be more. These are meaningful and should not be hard to add.
Comment 1 Bastiaan Ober 2012-10-19 23:02:22 UTC
On an additional note: multiplication, addition, subtraction of two diagonal matrices does not seem to be supported
Comment 2 Gael Guennebaud 2012-10-24 10:04:28 UTC
The lack of accessors is on purpose. We don't want to permit diagmat(i,j) because this is a very inefficient way of using a diagonal matrix. We could allow it in the case i==j, but then it is equivalent to use .diagonal()(i) instead of (i,i).

Regarding higher level operations, yes they are planed. Need the evaluator refactoring first.
Comment 3 Gael Guennebaud 2018-10-10 21:51:43 UTC
Added diagmat +/- diagmat:
Comment 4 Nobody 2019-12-04 11:55:34 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:

Note You need to log in before you can comment on or make changes to this bug.