39 if (msize < 2 || msize > 10) {
40 std::cout <<
"2 <= msize <= 10" <<std::endl;
43 std::cout <<
"--------------------------------------------------------" <<std::endl;
44 std::cout <<
"Inversion results for a ("<<msize<<
","<<msize<<
") matrix" <<std::endl;
45 std::cout <<
"For each inversion procedure we check the maximum size " <<std::endl;
46 std::cout <<
"of the off-diagonal elements of Inv(A) * A " <<std::endl;
47 std::cout <<
"--------------------------------------------------------" <<std::endl;
68 std::cout <<
"1. Use .InvertFast(&det)" <<std::endl;
70 std::cout <<
" for ("<<msize<<
","<<msize<<
") this is identical to .Invert(&det)" <<std::endl;
82 std::cout <<
" Maximum off-diagonal = " << U1_max_offdiag << std::endl;
83 std::cout <<
" Determinant = " << det1 << std::endl;
109 std::cout <<
"2. Use .Invert(&det)" << std::endl;
118 std::cout <<
" Maximum off-diagonal = " << U2_max_offdiag << std::endl;
119 std::cout <<
" Determinant = " << det2 << std::endl;
130 std::cout <<
"3. Use TDecompLU" << std::endl;
149 std::cout <<
" Maximum off-diagonal = " << U3_max_offdiag << std::endl;
150 std::cout <<
" Determinant = " << det3 << std::endl;
155 std::cout <<
"4. Use TDecompSVD on non-square matrix" << std::endl;
163 svd.Det(d1_svd,d2_svd);
169 std::cout <<
" Maximum off-diagonal = " << U4_max_offdiag << std::endl;
170 std::cout <<
" Determinant = " << det4 << std::endl;
double invertMatrix(const Matrix &matrix, Matrix &inverse)
THilbertMatrixT< Double_t > THilbertMatrixD
Single Value Decomposition class.
TMatrixT< Element > & InvertFast(Double_t *det=nullptr)
Invert the matrix and calculate its determinant, however upto (6x6) a fast Cramer inversion is used .
TMatrixT< Element > & Invert(Double_t *det=nullptr)
Invert the matrix and calculate its determinant.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.