This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 246 - .diagonal() for Array's
Summary: .diagonal() for Array's
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.0
Hardware: All All
: --- Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 15:45 UTC by Johan Pauwels
Modified: 2019-12-04 10:37 UTC (History)
2 users (show)



Attachments

Description Johan Pauwels 2011-04-11 15:45:13 UTC
Wouldn't it make sense to also allow .diagonal() for Eigen::Arrays? I know the differences in interface between Matrix and Array come from their mathematical interpretation, but can't you speak of the diagonal of a 2D array as well? It certainly would be handy for me, as I often want to manipulate just the diagonal of an Array.
Comment 1 Gael Guennebaud 2011-04-19 14:17:25 UTC
in the meantime you can still write:

myarrray.matrix().diagonal()

I cannot think about use cases where diagonal would make sense for arrays too, so could you please precise a bit your use case/context? 

thanks
Comment 2 Nobody 2019-12-04 10:37:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com'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: https://gitlab.com/libeigen/eigen/issues/246.

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