Re: [eigen] MatrixX multiply

[ Thread Index | Date Index | More Archives ]

Hello Steven,

On Thursday 15 February 2007 15:38:15 Steven große Deters wrote:
> Hello everyone,
> this is my first post here. I am new to Eigen and do not know if this is
> the right place to ask this kind of question, so please bear with me.

Sure it is the right place!

> MatrixXf A(dim), B(dim), C(dim);     // dim = dimension of matrix
> A.multiply(B, &C);
> Is that the right function for a linear algebraic product ?

Yes, this is the fastest way to set A to be equal to the matrix product B*C.

You could also write

	A = B * C;

but that would be slower because that would cause unnecessary copies. 
Therefore it is better to use multiply() as you do, when speed matters.

> What would be the right function for an entry by entry product ?

Currently, Eigen doesn't provide any function for entry-by-entry product. The 
reason is, that I have never seen a real-world use for that operation.

If you have a real need for it, could you explain it to me? If it's 
convincing, i'll add it to the Eigen API for the next minor update (1.0.4).


Attachment: pgpQikaEz7zoi.pgp
Description: PGP signature

Mail converted by MHonArc 2.6.19+