This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 344

Summary: Diagonal lacks the data() method
Product: Eigen Reporter: Frederic TERRAZZONI <akryus>
Component: Core - generalAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: minor CC: chtz, gael.guennebaud, jacob.benoit.1
Priority: ---    
Version: 3.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 58    
Bug Blocks:    

Description Frederic TERRAZZONI 2011-09-07 22:53:56 UTC
Short example :

MatrixXd mat(10,10);

double * a = mat.data(); // OK
double * b = mat.diagonal().data(); // The method data() does not exist
Comment 1 Christoph Hertzberg 2011-09-07 23:05:26 UTC
If it is the diagonal of a direct access type, this should be solved directly by solving bug 58. (And for non direct access the data() function would not make sense.)
As a first workaround, one could Matrix<...>::diagonal() return a strided map.
Comment 2 Nobody 2019-12-04 11:06:34 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/344.