|Re: [eigen] documentation: the long tutorial|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] documentation: the long tutorial
- From: Carlos Becker <carlosbecker@xxxxxxxxx>
- Date: Mon, 21 Jun 2010 14:11:21 +0100
- 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; bh=jZE/FuzmwHbYX7T0kl76AlKZpPT21EKdTwjJKwRmle4=; b=Jci3iugkJwvRVhEqcJ9Ndy2OTqh8bh9gSl38sDT88sQ+D4YVnJYc+loMXzRN1kD9V3 jRINg3/YoW3nYOP92iYqRDMY0UhaZGXrkaQfMHK0W5IwDR9VfcI0/g5wYiOH1Elevlnr 33Q50V1nj+bIYffgU/AomFjxXvIc3N/ivlKZI=
- 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; b=cVYLec30otmSuIHSR802Qr6VLvOO5XRcLxxl2M41JaJPMwxTKktrUgxEzACH+msLdb XYX5EaQuE2ZwwX4TeWkCnkshnFW5fp7U68USHgPWmrLtyggwT+OVvYmELd8jAIkRoc0z 0nqNOf+GqRdWMEa6TyoOLnnqzdQKe5QQvYFtQ=
On Mon, Jun 21, 2010 at 12:43 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
Thanks. My main comment is that this needs a better structuring. For
example, the first example already shows the comma-initializer without
an explanation and already shows various products. I think the
comma-initializer deserves a short paragraph for itself (which is OK
to put in this page) and products totally deserve a paragraph for
themselves before you do any (except scalar-matrix product, that is OK
to do without a former explanation).
Ok, I thought that comma initializers would be explained in the previous sections. Regarding the product explanation, there is a short paragraph at the end but maybe it should be more explanatory.
It's good to explain right away that Matrix is only for linear algebra
and to forward-link to Array for coeff-wise ops. But rowwise and
colwise addition and substraction are actually available for matrices
as well (rowwise() is in DenseBase, not in ArrayBase) so that's not
the right example ;) since you just mentioned scalar+array, stick to
Ok, so maybe I can also link forward to row and col-wise operations there.
In the paragraph "Combining operators in a single statement" you give
an example of how that allows to avoid useless temporaries, but in
that example, actually, that temporary is not useless at all (write
down the computation yourself on pen&paper, for
tempMatrix = m + n/2;
v = tempMatrix * v;
you'll see that doing the temporary actually reduces complexity) and
Eigen is clever enough to understand that, so actually in the 2nd
version in one line, Eigen internally uses such a temporary.
If you want a good example of combining arithmetic operations into a
big _expression_ to avoid temporaries, the easiest way to get a good
example is to just use additions and scalar-matrix multiplications.
But I would not mention that at the top of this page, I'd rather put
at the end of it, since it's an advanced topic.
In short: we need this page to expose all the basic arithmetic in a
rational, systematic, and progressive way, treating one thing at a
time, and deferring the advanced topics to the end.
Ok, I got it. I will send you the next draft when its done.