Re: [eigen] new tutorial on writing functions taking Eigen types as paramters |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] new tutorial on writing functions taking Eigen types as paramters
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 4 Aug 2010 10:26:59 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=y+zDvWOo8Llu+Gl3SIXEhSYXPpH+ts8wqDI46lIMwcU=; b=Syw+Sm6lUHIFuPEHF3B7QR/jEBVs1qdJ1CQu1eOs/v+OgDhSPJ3rlXDZBqvLUVnjhQ cu0JUSpHVcKru1Biw1tR+CJ/uyG+uD+3PJWtdmhxwwawAm12ZVkahmrRGuO3H1Ji28cw Bn3clGYoK+37JhCirqTxgN8CIXGg8sxe/kK4A=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=t0JP5pC7EExpSebyf//rrARpWRov2iJYMEJBjKf7i6MjQjg/SFHJvV8cevUPBSJCzI Xe8KCD2e4VyezfkGYe9f75f7sOiasvAw0+ByFuTcxVvRMCCb2VgH8v7Ae8XQkVKy++XE DRQfyRDaGh/x1UjnLZzdr43GCJ5chcpKSLbBU=
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.
>
>
>