1 #ifndef DataFormat_Math_invertPosDefMatrix_H 2 #define DataFormat_Math_invertPosDefMatrix_H 4 #define SMATRIX_USE_CONSTEXPR 5 #include "Math/SMatrix.h" 6 #include "Math/CholeskyDecomp.h" 9 template <
typename T,
unsigned int N>
11 ROOT::Math::CholeskyDecomp<T, N> decomp(
m);
19 template <
typename PDM2>
25 auto c1 =
m[1] *
m[1] *
c0;
26 auto c2 =
one / (
m[2] -
c1);
30 m[1] = -
m[1] *
c0 * c2;
36 m(0, 0) = 1. /
m(0, 0);
41 m(0, 0) = 1.f /
m(0, 0);
56 template <
typename T,
unsigned int N>
58 ROOT::Math::SMatrix<
T,
N,
N, ROOT::Math::MatRepSym<T, N> >& mOut) {
59 ROOT::Math::CholeskyDecomp<T, N> decomp(mIn);
bool invertPosDefMatrix< double, 1 >(ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > &m)
bool invertPosDefMatrix< double, 2 >(ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > &m)
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
bool invertPosDefMatrix< float, 1 >(ROOT::Math::SMatrix< float, 1, 1, ROOT::Math::MatRepSym< float, 1 > > &m)
bool invertPosDefMatrix< float, 2 >(ROOT::Math::SMatrix< float, 2, 2, ROOT::Math::MatRepSym< float, 2 > > &m)
void fastInvertPDM2(PDM2 &mm)