PlainObjectBase::Map(data,stride) and similar should get a default parameter for stride, so they can be called without specifying "stride" when the outer/inner template parameters are provided. That makes it more consistent with Map::Map().
This had been fixed a while ago. The following (and similar) work at least with Eigen 3.2 and later:
Map<Vector3d, Unaligned, InnerStride<2> > map1(data);
Map<VectorXd, Unaligned, InnerStride<2> > map2(data,3);
Map<MatrixXd, Unaligned, OuterStride<10> > map3(data, 2, 2);
Ok, misunderstanding. I guess you meant to write things like:
MatrixXd::Map<2,1>(data, 2,2 /* implicit Stride<2,1>() here */);
Not sure if that is really a good idea. But I'll reopen that for now.
hm, you're supposed to call them like this:
MatrixXd::Map(data, 2,2 Stride<2,1>() );
This is more readable, and this allows you to use shortcuts, like:
MatrixXd::Map(data, 2,2 OuterStride<2>() );
I improved the doc with an example, this should be good enough:
Summary: Bug 336: improve doc for PlainObjectBase::Map
-- 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/336.