00001 #ifndef LHCBMATH_MATRIXINVERSION_H
00002 #define LHCBMATH_MATRIXINVERSION_H
00003
00004
00005
00006
00007 #include "GaudiKernel/SymmetricMatrixTypes.h"
00008
00009
00010
00011
00012 #include "SymMatrixInverter.h"
00013 #include "SymPosDefMatrixInverter.h"
00014
00015
00024 namespace Gaudi
00025 {
00026 namespace Math
00027 {
00053 template<class T> inline bool invertPosDefSymMatrix(T& matrix)
00054 {
00055 enum { N = T::kRows };
00056 typedef typename T::value_type F;
00057 typedef typename ROOT::Math::MatRepSym<F, N> R;
00058 typedef typename ROOT::Math::SMatrix<F, N, N, R> M;
00059 return Gaudi::Math::SymPosDefMatrixInverter::inverter<M, F, N>()(matrix);
00060 }
00061
00091 template<class T> inline bool invertSymMatrix(T& matrix)
00092 {
00093 enum { N = T::kRows };
00094 typedef typename T::value_type F;
00095 typedef typename ROOT::Math::MatRepSym<F, N> R;
00096 typedef typename ROOT::Math::SMatrix<F, N, N, R> M;
00097 return Gaudi::Math::SymMatrixInverter::inverter<M, F, N>()(matrix);
00098 }
00099 }
00100 }
00101
00102 #endif // LHCBMATH_MATRIXINVERSION_H
00103
00104