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

[ Thread Index | Date Index | More Archives ]

2010/8/4 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> I already pushed it this morning though the docs are not yet rebuild.

Ah ok, i see it now. Bitbucket's email notification is just not working.

> I focused on one specific example and investigated different types of
> implementations discussing each implementation's problems and
> benefits.
> Currently, the page only covers MatrixBase (and ArrayBase since the
> same discussion holds for both classes). So nothing about DenseBase --
> regarding the class hierarchy, there is already some information
> there, right? Or what exactly do you mean?

So, a few remarks/comments.

1. I would like this page to start with a very simple example e.g.
template<typename T>
void print_size(const DenseBase<T>& m)
  std::cout << "size: " << m.rows() << "x" << m.cols() << std::endl;

2. I would like arrays and matrices to be treated a bit more on an
equal footing (instead of focusing 90% on MatrixBase) and I would like
DenseBase to be explained, and EigenBase to be briefly mentioned. Tell
the user that:
 - MatrixBase is for all dense matrix expressions
 - ArrayBase is for all dense array expressions
 - DenseBase is for all dense expressions
 - EigenBase is for all Eigen objects, including pseudo-expressions
such as DiagonalMatrix.

I think this page should at least contain 1 example for each of these
base classes.

3. You can strip a bit the language e.g. in "Eigen is making heavy use
of expression templates and as a consequence almost all operations on
Matrices and Arrays result in individual objects." <---- every C++
function returns an "individual object" (if not void) so this sentence
doesn't seem to contain much information. I think that what you really
mean here is that every different expression has a different type,
e.g. a+b has a different type than a+b+c.

Benoit (has to go back to work :) )

> - Hauke
> On Wed, Aug 4, 2010 at 4:05 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> Great idea, looking forward to it. The way I see it:
>>  - we need a special topic page on the main base classes (DenseBase,
>> ...) which could give examples of functions taking Eigen objects.
>>  - we need a very abridged/simplified version of that on the last page
>> of the tutorial, which should be where users learn what they really
>> need to know in order to be a little autonomous reading the docs
>> (which requires them to know a little about the base classes).
>> The question of how to write a function taking eigen objects as
>> arguments is one we've answered easily 10 times on the forum. Having
>> something to link to would be very valuable.

Mail converted by MHonArc 2.6.19+