CMS 3D CMS Logo

Macros | Functions
invertPosDefMatrix.h File Reference
#include "Math/SMatrix.h"
#include "Math/CholeskyDecomp.h"
#include <type_traits>

Go to the source code of this file.

Macros

#define SMATRIX_USE_CONSTEXPR
 

Functions

template<typename PDM2 >
void fastInvertPDM2 (PDM2 &mm)
 
template<typename T , unsigned int N>
bool invertPosDefMatrix (ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
 
template<typename T , unsigned int N>
bool invertPosDefMatrix (ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > const &mIn, ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &mOut)
 
template<>
bool invertPosDefMatrix< double, 1 > (ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > &m)
 
template<>
bool invertPosDefMatrix< double, 2 > (ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > &m)
 
template<>
bool invertPosDefMatrix< float, 1 > (ROOT::Math::SMatrix< float, 1, 1, ROOT::Math::MatRepSym< float, 1 > > &m)
 
template<>
bool invertPosDefMatrix< float, 2 > (ROOT::Math::SMatrix< float, 2, 2, ROOT::Math::MatRepSym< float, 2 > > &m)
 

Macro Definition Documentation

◆ SMATRIX_USE_CONSTEXPR

#define SMATRIX_USE_CONSTEXPR

Definition at line 4 of file invertPosDefMatrix.h.

Function Documentation

◆ fastInvertPDM2()

template<typename PDM2 >
void fastInvertPDM2 ( PDM2 &  mm)

◆ invertPosDefMatrix() [1/2]

template<typename T , unsigned int N>
bool invertPosDefMatrix ( ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &  m)
inline

◆ invertPosDefMatrix() [2/2]

template<typename T , unsigned int N>
bool invertPosDefMatrix ( ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > const &  mIn,
ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &  mOut 
)
inline

Definition at line 57 of file invertPosDefMatrix.h.

58  {
59  ROOT::Math::CholeskyDecomp<T, N> decomp(mIn);
60  if (!decomp) {
61  mOut = mIn;
62  return mOut.Invert();
63  } else
64  decomp.Invert(mOut);
65  return true;
66 }

◆ invertPosDefMatrix< double, 1 >()

template<>
bool invertPosDefMatrix< double, 1 > ( ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > &  m)
inline

Definition at line 35 of file invertPosDefMatrix.h.

References visualization-live-secondInstance_cfg::m.

35  {
36  m(0, 0) = 1. / m(0, 0);
37  return true;
38 }

◆ invertPosDefMatrix< double, 2 >()

template<>
bool invertPosDefMatrix< double, 2 > ( ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > &  m)
inline

Definition at line 46 of file invertPosDefMatrix.h.

References fastInvertPDM2(), and visualization-live-secondInstance_cfg::m.

46  {
48  return true;
49 }
void fastInvertPDM2(PDM2 &mm)

◆ invertPosDefMatrix< float, 1 >()

template<>
bool invertPosDefMatrix< float, 1 > ( ROOT::Math::SMatrix< float, 1, 1, ROOT::Math::MatRepSym< float, 1 > > &  m)
inline

Definition at line 40 of file invertPosDefMatrix.h.

References visualization-live-secondInstance_cfg::m.

40  {
41  m(0, 0) = 1.f / m(0, 0);
42  return true;
43 }

◆ invertPosDefMatrix< float, 2 >()

template<>
bool invertPosDefMatrix< float, 2 > ( ROOT::Math::SMatrix< float, 2, 2, ROOT::Math::MatRepSym< float, 2 > > &  m)
inline

Definition at line 51 of file invertPosDefMatrix.h.

References fastInvertPDM2(), and visualization-live-secondInstance_cfg::m.

51  {
53  return true;
54 }
void fastInvertPDM2(PDM2 &mm)