Re: [ROOT] TMatrixD::SetElements

From: Edmond Offermann (edmondoffermann@yahoo.com)
Date: Fri May 21 2004 - 08:32:20 MEST


Hi Sebastien and Carlos,

About 6 months ago, I asked in roottalk
(http://root.cern.ch/root/roottalk/roottalk03/4730.html)
who is using this routine . Nobody reacted.

Reason was that the internals of the matrix package
have been rewritten . In particular, the storage
of the array elements . It used to be column-wise,
now it is row-wise !!!!

If one accesses these elements directly (through
GetElements()) , one has to carefully consider the
implications of this change . For instance, if your
matrix is symmetric, you do not care .

In order to avoid mishap, we decided to change the
name
of the routine and make the old one private, so that
the user is forced to look at it .

Replacing GetElements by GetMatrixArray, can not be a
big deal fo the user, however using the methods on 
non-symmetric matrices, not being aware of the storage
change is a disaster.

Eddy
--- Sebastien Greder <greder@in2p3.fr> wrote:
> 
>  Hi Carlos,
> 
>  you're right I just noticed this also and it is
> very annoying, 
>  breaking backward compatibility ; it has been
> replaced by  
>  SetMatrixArray and moved up in TMatrixDBase class.
>  Could the developpers take it back since
> SetMatrixArray uses 
>  the same logic ; SetElements would just have to
> make a call 
>  to the latter.
>  
>  thanks,
> 
>  sebastien.
> 
> On Thu, 20 May 2004, [ISO-8859-1] Carlos Muņoz
> Camacho wrote:
> 
> > 
> > Hi,
> > 
> >    What happened to TMatrixD::SetElements(const
> Double_t* elements,
> > Option_t* option) in ROOT 4.00/04 ? It doesn't
> seem to be there any
> > more and I wouldn't like to change all my code
> which extensively relies on
> > this method.
> > 
> > Carlos
> > 
> > 
> 
>  
>
---------------------------------------------------------------------
>  | Sebastien GREDER                        tel : 
> +33 (0)3 88 10 63 54 |
>  | D0 Strasbourg,	  					       |
>  | Institut de Recherches Subatomiques     fax : 
> +33 (0)3 88 10 62 34 |
>  | 23, rue du loess - BP 28                secr :
> +33 (0)3 88 10 66 40 |
>  | F-67037- STRASBOURG cedex 2             e-mail :
> greder@in2p3.fr,   |
>  |						    greder@fnal.gov    |
>  
>
---------------------------------------------------------------------
> 
> 
> 
> 
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET