34 if (msize < 2 || msize > 10) {
35 cout <<
"2 <= msize <= 10" <<endl;
38 cout <<
"--------------------------------------------------------" <<endl;
39 cout <<
"Inversion results for a ("<<msize<<
","<<msize<<
") matrix" <<endl;
40 cout <<
"For each inversion procedure we check the maxmimum size " <<endl;
41 cout <<
"of the off-diagonal elements of Inv(A) * A " <<endl;
42 cout <<
"--------------------------------------------------------" <<endl;
63 cout <<
"1. Use .InvertFast(&det)" <<endl;
65 cout <<
" for ("<<msize<<
","<<msize<<
") this is identical to .Invert(&det)" <<endl;
77 cout <<
" Maximum off-diagonal = " << U1_max_offdiag << endl;
78 cout <<
" Determinant = " << det1 <<endl;
104 cout <<
"2. Use .Invert(&det)" <<endl;
113 cout <<
" Maximum off-diagonal = " << U2_max_offdiag << endl;
114 cout <<
" Determinant = " << det2 <<endl;
125 cout <<
"3. Use TDecompLU" <<endl;
144 cout <<
" Maximum off-diagonal = " << U3_max_offdiag << endl;
145 cout <<
" Determinant = " << det3 <<endl;
150 cout <<
"4. Use TDecompSVD on non-square matrix" <<endl;
158 svd.
Det(d1_svd,d2_svd);
164 cout <<
" Maximum off-diagonal = " << U4_max_offdiag << endl;
165 cout <<
" Determinant = " << det4 <<endl;
virtual void Det(Double_t &d1, Double_t &d2)
Matrix determinant det = d1*TMath::Power(2.,d2)
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual void Det(Double_t &d1, Double_t &d2)
Calculate determinant det = d1*TMath::Power(2.,d2)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
TMatrixT< Element > & Invert(Double_t *det=0)
Invert the matrix and calculate its determinant.
R__EXTERN TSystem * gSystem
Bool_t Invert(TMatrixD &inv)
For a matrix A(m,n), its inverse A_inv is defined as A * A_inv = A_inv * A = unit The user should alw...
THilbertMatrixT< Double_t > THilbertMatrixD
Bool_t Invert(TMatrixD &inv)
For a matrix A(m,m), its inverse A_inv is defined as A * A_inv = A_inv * A = unit (m x m) Ainv is ret...
void invertMatrix(Int_t msize=6)
Short_t Max(Short_t a, Short_t b)
TMatrixT< Element > & InvertFast(Double_t *det=0)
Invert the matrix and calculate its determinant, however upto (6x6) a fast Cramer inversion is used ...
virtual TMatrixTBase< Element > & Abs()
Take an absolute value of a matrix, i.e. apply Abs() to each element.