New user self-registration is disabled due to spam. Please email eigen-core-team @ if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 344 - Diagonal lacks the data() method
Summary: Diagonal lacks the data() method
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.0
Hardware: All All
: --- minor
Assignee: Nobody
Depends on: 58
  Show dependency treegraph
Reported: 2011-09-07 22:53 UTC by Frederic TERRAZZONI
Modified: 2011-09-07 23:05 UTC (History)
3 users (show)


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

MatrixXd mat(10,10);

double * a =; // 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.

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