New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
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: 2011-04-19 14:17 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

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