Re: Direct product of matrices.

From: Victor Perevoztchikov <perev_at_bnl.gov>
Date: Fri, 2 Feb 2007 12:24:53 -0500


Hi Art,
unfortunatelly method T(),change the matrix, not only return transposed. So when multiplication started "both" matrices are transposed. You need to copy matrix and transpose. Which is not convenient, I agree.

Victor

Victor M. Perevoztchikov perev_at_bnl.gov Brookhaven National Laboratory MS 510A PO Box 5000 Upton NY 11973-5000 tel office : 631-344-7894; fax 631-344-4206;

> Hi Rene et al.,
>
>
> Direct product of matrices which worked with HepMatrix does seem to work
> for TMatrix.
>
> That is if I do
>
> TMatrixD A(n,1);
> then set a to some falues
>
> TMatrixD B(n,n);
> B=A*A.T()
>
> it fails. Error message if about rows and columns not matching.
>
> This worked with HepMatrix and is useful, for example, in constructing
> array of derivatives that enters some fits.
>
> Is this a bug or a feature? Or am I doing something wrong?
>
> It not hard to write my own direct product function but it looks ugly...
>
> -Art S.
>
>
>
> A.E. Snyder, Group EC \!c*p?/
> SLAC Mail Stop #95 ((. .))
> Box 4349 |
> Stanford, Ca, USA, 94309 '\|/`
> e-mail:snyder_at_slac.stanford.edu o
> phone:650-926-2701 _
> http://www.slac.stanford.edu/~snyder BaBar
> FAX:650-926-2657 Collaboration
>
>
>
Received on Fri Feb 02 2007 - 18:25:18 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 02 2007 - 23:50:01 CET