Re: [eigen] help using foo(const MatrixBase<T>&) with (u * v)

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Am 12.03.2015 um 21:44 schrieb Daniel Lee:
It seems to work fine for transpose, for Map, for MatrixXd, but
here's a minimal example of the problem we're running into with
products:

Accessing products coefficient-wise is generally not a good idea. If you really want to do that, consider calling foo(u.lazyProduct(v),0,0); If you want to access multiple coefficients from a inside foo, passing via (const Ref<const MatrixXd>&) is probably a better idea.

If I change the #ifdef to an #ifndef, everything works as expected.
Are we somehow supposed to be setting the EIGEN2_SUPPORT property
ourselves?  If I do that in the compilation, it works as expected, but
I get a deprecation warning:

Yes, you can do that, and you can disable the deprecation warning by also defining EIGEN_NO_EIGEN2_DEPRECATED_WARNING.
But as the warning says, this will not be possible with Eigen 3.3 anymore.
See this and the pages linked from there:
http://eigen.tuxfamily.org/dox/Eigen2ToEigen3.html


Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/