Re: [ROOT] Compute the determinant and invert a covariance matrix

From: Eddy Offermann (eddy@rentec.com)
Date: Mon Jul 14 2003 - 19:15:15 MEST


Sure,

But have a look at TVectorD instead of TMatrixD:

 TMatrixD B =...
 TVectorD x = ....
 
 TVectorD y(x); y *= B;
 const Double_t val = x*y;

> Hi,
> 
> With TMatrix class, is it possible to compute the product x^T B x without
> having to copy the x elements in memory to generate x^T?
> 
> Thank you!
> 
> Pierre-Luc Drouin
> 
> On Mon, 14 Jul 2003, Eddy Offermann wrote:
> 
> > Hi Pierre,
> > 
> > For the moment use Double_t TMatrixD::Determinant() in a future release
> > I will have InvertPosdef changed to InverPosdef(Double_t *determ_ptr = 0)
> > so that if you supply a pointer to a Double_t the determinant is returned
> > (like the Invert function)
> > 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET