Re: [ROOT] matrix inversion class; comments please

From: Eddy Offermann (eddy@rentec.com)
Date: Mon Dec 11 2000 - 23:00:23 MET


Hi Valery,

You are absolutely right. Bare double pointers are faster. Reason for using
currently TArrayD is the boundary checking  !!, useful for testing
the code. "GetSize()" is only used four times, so change to "Double_t *" should
be painless.

Concerning your second point. I am not so familiar with the KERNLIN (??) 
routines. I guess that some of my private routines (specifically 
GetColumn,PutColumn,GetRow,PutRow,GetSubMat,PutSubMat) overlap with the TCL 
class. On the otherhand, TInverse emphasis is on single-value decomposition.
However, I have no objection to merging them, except maybe using a class name
like TCL: System managers on this side give me very unfriendly looks when 
suddenly libraries show up in the general areas like "libCore, libNew etc",
adding something like libTCL will certainly not improve relations :-)

Best REgards,
Eddy

 
> From: "Valeri Fine (Faine)" <fine@bnl.gov>
> To: "Eddy Offermann" <eddy@rentec.com>, <roottalk@pcroot.cern.ch>
> Subject: Re: [ROOT] matrix inversion class; comments please
> Date: Mon, 11 Dec 2000 16:19:49 -0500
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
> X-Filter-Version: 1.3 (ram)
> 
> Hello Eddy
> 
> Great. It has many essential functions
> http://root.cern.ch/root/htmldoc/TCL.html
> lacks of.
> 
>  A few questions.
> 
>  Why did you use TArrayD? What is the advantage. 
>  It seems to me the regular 'double" here works better and the code must 
>  work much faster.
> 
> May be you could merge TCL class  with yours. It would be more simple for the 
> potential end-users dealing with a single "package".
> 
>   With my best regards
>                                           Valery
> 
> 
> 
> ----- Original Message ----- 
> From: Eddy Offermann <eddy@rentec.com>
> To: <roottalk@pcroot.cern.ch>
> Subject: [ROOT] matrix inversion class; comments please
> 
> 
> > Dear Root-ers,
> > 
> > Maybe some interesting addition to ROOT. I have written a collection
> > of matrix inversion routines, ranging from pseudo-inverse,
> > inverse through LU decomposition to inversion of a pos-def matrix.
> > 
> > The pseudo-inverse is calculated through a  single-value decomposition.
> > These routines can also be used to minimize linearized problems with/without
> > constrains.
> > 
> > However, the implementation/interface is maybe not optimal.
> > Following considerations flowed in:
> > 
> > - The TMatrix class is extremely nice but very well "protected".
> >   It is hard to get data in and out. Unless you have a TMatrix object it is 
hard
> >   to perform an inversion. That is why I did not install these routines into
> >   Tmatrix
> > 
> > - I thought that the easiest way was to exchange data through array's and 
chose
> >   for TArrayD.
> > 
> > - Like in TMath, I use  TInverse as a kind of namespace.
> > 
> > - are these routines general enough to warrant installation into ROOT or 
maybe
> >   people should use other (public domain) libraries. On the other hand, 
these
> >   are nicely integrated into ROOT ...
> > 
> > - Single value decomposition will be a useful concept for optimizing less
> >   well defined problems (e.g. due to lack of data). Also boundary conditions 
can 
> >   be added quite elegantly.
> > 
> > I have added a small program solve.C to create a little stand-alone test 
program
> > comparing a linear fit with the traditional normal equations with single-
> > value decomposition.
> > 
> > 
> > The Makefile will need a bit of work it is just a straight copy from the way
> > things are done at Renaissance.
> > 
> > Anyhow, please have a look at it and sent me your comments.
> > 
> > Best Regards Eddy
> > 
> > 
> > Attached file is a compressed tar-file of:
> > 
> > Makefile
> > TInverse.C
> > TInverse.h
> > TInverse_LinkDef.h
> > solve.C
> > 
> > 
> 

Eddy A.J.M. Offermann
Renaissance Technologies Corp.
Route 25A, East Setauket NY 11733
e-mail: eddy@rentec.com
http://www.rentec.com



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET