Re: [eigen] return type of inner product |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Benoit Jacob a écrit :
Hi,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 What about using a (not existing yet I suppose) Matlab => C++/Eigen translator ? I am thinking about such a beast, and surely 1x1 Matrix would be more convenient in such cases. But we should discuss that in another thread. --
Robert Bocquier ARTURIA 4 chemin de Malacher 38240 Meylan - France Tel: +33 438 020 555 Fax: +33 438 020 525 http://www.arturia.com |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |