Re: [ROOT] Complex Matrix, Complex Vector

From: Pasha Murat (630)840-8237 FNAL (630)859-3463 home (murat@murat.fnal.gov)
Date: Mon May 21 2001 - 03:53:01 MEST


hi Thorsten, you're certainly making very good points. I just want to comment that
if one doesn't care too much about the "design" issues and, understanding the 
difficulties faced by the compiler, tries to help it, in most [important practically] 
cases he can get around rather easily without using templates:

- case of the Kalman filter: one needs specialized 3x3, 5x3 and 5x5 matrix classes
  which wouldn't do memory allocation dynamically (I'd also add specialized 2x2
  class)
- matrix operations: methods like Matrix::Add(const Matrix& m1, Matrix& m2) 
  and such would do the job pretty efficiently. In general it is quite clear 
  that one should AND CAN stay away from creating new matrices on the fly and 
  returning them by value.

At the same time I really think that if we forget the issues related to the 
interpreting of the C++ code, matrix/vector operations with templated dimensions
give us one of the very few examples where using templates [in HEP] is justified...

							-best, Pasha



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:46 MET