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>
23 constexpr
typename std::remove_reference<decltype(
m[0])>
::type one = 1.;
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);