Re: [eigen] return type of inner product |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] return type of inner product
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 2 Oct 2009 08:45:31 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=fRdb5vs9cd8ph78PZS16Ba8DCz5iShg2UywAwqQDhzI=; b=r1q+AG5vvelWn9FtVf4ih5SZeBlIhQw37sXs4Bc/0heWS42y3WLjIs1SuKefUkYWTN AUBpg3KODNxnWbCTF/44MWQVopfApFYp4m+JKLkNiESPoIgfHgH5vy+L4VJPD/DK+MQb 9aN4AqVhOjb8B3mYr1mEOG+WWFs2t3HtRqScs=
- 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=DUDdQuKzmEMVc875jQHjC0p846lozJkV8Dk8TvqvdIAJat3ORPzYOolJS8OgrTHkTN H+ICzoixlgr7rkZmdnI+H5qqiZPvzhlB4HWl6QlR66pH899NRcOri674hLEFrvQeHAw6 1ErYLeXFuhWl2oVAD36Xm71eg8iFhjk8S2wKU=
2009/10/1 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
> hi,
>
> I still have a FIXME in the Product.h file that I'd like to discuss:
>
> // FIXME : maybe the "inner product" could return a Scalar
> // instead of a 1x1 matrix ??
> // Pro: more natural for the user
> // Cons: this could be a problem if in a meta unrolled algorithm a matrix-matrix
> // product ends up to a row-vector times col-vector product...
>
> any opinion ?
>
> note that here "inner product" denotes any row-vector times col-vector
> products, and not the .dot() function which of course returns a
> scalar.
Hm, I really can't make myself an opinion either way!
I don't think that the problem for meta-unrolled algorithms is very
important, as that's a very rare use case and these could well handle
a special case with a specialization.
So i'm 63.7% in favor of your proposal to make it return a Scalar.
Benoit