Re: [eigen] new tutorial on writing functions taking Eigen types as paramters

[ Thread Index | Date Index | More Archives ]


thank you Hauke for your effort on writing this page.

On Thu, Aug 5, 2010 at 3:48 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> - mention Nested (at the end of the page! it's an advanced topic, but
> it's important for advanced users).

I don't think this is an advanced topic, and to be safe, every
argument should be systematically converted to their nested type:

template<typename Derived> void foo(const MatrixBase<Derived>& _x)
  typename Derived::Nested x (_x);

  // use x, not _x

For advanced user we should also explain ei_nested which is preferred
if the argument is used more than once. Since ei_nested is mostly
internal, maybe we should also add a slightly higher level public


Mail converted by MHonArc 2.6.19+