CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_3_4/src/DataFormats/Math/interface/invertPosDefMatrix.h File Reference

#include "Math/SMatrix.h"
#include "Math/CholeskyDecomp.h"

Go to the source code of this file.

Functions

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)

Function Documentation

template<typename T , unsigned int N>
bool invertPosDefMatrix ( ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &  m) [inline]
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 21 of file invertPosDefMatrix.h.

References ROOT::Math::CholeskyDecomp< F, N >::Invert().

                                                                               {
  
  ROOT::Math::CholeskyDecomp<T,N> decomp(mIn);
  if (!decomp) {
    mOut=mIn;
    return mOut.Invert();
  } else 
    decomp.Invert(mOut);
  return true;

}