Re: matrix multiplication

From: Edmond Offermann <edmondoffermann_at_yahoo.com>
Date: Wed, 3 Aug 2005 06:55:19 -0700 (PDT)


Hi Mario,

Yes , there is a one-liner available, using the Transpose function:

or if we are dealing with symmetric matrices (TMatrixDSym), one can stay in the
syummetric class through

     TMatrixDSym UmUt = m.Similarity(U);

Eddy

> Hello,
>
> is there a way to do the following multiplication in one line?
>
> U . m . U^T
>
> if I try it this way:
> U*=(m*=U.T())
>
> then it gets screwed up because U.T() transposes U and then I
> basically
> have U^T . m . U^T. However if I try to transpose U again during this
> task like this:
> (U.T())*=(m*=U.T())
> then I still get the same result as above (which is wrong).
>
> Is there a way to concatenate such multiplications into one line or
> some
> way to force the m*=U.T() to not change U in the process?
>
> Mario
>
> PS! U,m are 2x2 matrices
>
Received on Wed Aug 03 2005 - 16:05:38 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET