Re: [ROOT] get elements of a TMatrixD

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Mar 14 2002 - 08:40:13 MET


Hi Nicolas,

I agree with your comments. Too much data hiding in the design of this class.
Would you be willing to send the few lines (getters) that you would like to see
in TMatrixD, also TMatrix and TVector(D) ?

Rene Brun

Nicolas Produit wrote:
> 
> Hi,
> 
> I have to initialise a TMatrixD from an array of double
> and also to give all the element of a TMatrixD to a routine that expect
> a double* (for example to sort all the elements of a matrix)
> There is no way of acessing FElements (private and no method to access it).
> I see that &x(0,0) is not FElements but just the adress of a copy of its
> content.
> 
> Is it possible to have a method that return FElements?
> What will be also very handy for me is to be able to use a TMatrix as a
> TArray because my structure is at hte same time a matrix and an array.
> So an operator [int] with just one element accessing
> the elements of matrix from 0 to GetNoElements()-1 will be very usefull.
> I would be able to use a loop on x[i] rather then an apply method wich
> is much more complicated.
> 
> Thanks
> 
> --
> Nicolas Produit
> INTEGRAL Science Data Center    Phone:  +41 22 950 91 40
> 16, Chemin d'Ecogia             Fax:    +41 22 950 91 33
> CH-1290 Versoix                 www:    http://isdc.unige.ch/



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET