68template <
unsigned int idim,
unsigned int n =
idim>
74 template <
class MatrixRep>
75 static bool Dinv(MatrixRep& rhs) {
79 unsigned int work[
n+1] = {0};
81 typename MatrixRep::value_type det(0.0);
84 Error(
"Inverter::Dinv",
"Dfact_matrix failed!!");
89 if (ifail == 0)
return true;
101 if (ifail == 0)
return true;
143template <
unsigned int idim,
unsigned int n =
idim>
147 template <
class MatrixRep>
148 static bool Dinv(MatrixRep& rhs) {
170 template <
class MatrixRep>
171 inline static bool Dinv(MatrixRep&) {
return true; }
187 template <
class MatrixRep>
188 static bool Dinv(MatrixRep& rhs) {
193 rhs[0] = 1. / rhs[0];
212 template <
class MatrixRep>
213 static bool Dinv(MatrixRep& rhs) {
215 typedef typename MatrixRep::value_type T;
216 T det = rhs[0] * rhs[3] - rhs[2] * rhs[1];
218 if (det == T(0.) ) {
return false; }
225 rhs[2] = -s * rhs[2];
226 rhs[1] = -s * rhs[1];
238 T * rhs = rep.
Array();
240 T det = rhs[0] * rhs[2] - rhs[1] * rhs[1];
243 if (det == T(0.)) {
return false; }
248 rhs[1] = -s * rhs[1];
270 template <
class MatrixRep>
271 static bool Dinv(MatrixRep& rhs);
285 template <
class MatrixRep>
286 static bool Dinv(MatrixRep& rhs);
300 template <
class MatrixRep>
301 static bool Dinv(MatrixRep& rhs);
312template <
unsigned int idim>
316 template <
class MatrixRep>
318 STATIC_CHECK(
false, Error_cholesky_SMatrix_type_is_not_symmetric );
324 return decomp.
Invert(rhs);
header file containing the templated implementation of matrix inversion routines for use with ROOT's ...
#define STATIC_CHECK(expr, msg)
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
static bool Dinv(MatRepSym< T, idim > &rhs)
static bool Dinv(MatrixRep &)
class to compute the Cholesky decomposition of a matrix
bool Invert(M &m) const
place the inverse into m
Fast Matrix Inverter class Class to specialize calls to Dinv.
static bool Dinv(MatRepSym< T, idim > &rhs)
static bool Dinv(MatrixRep &rhs)
static bool Dinv(MatrixRep &)
static bool Dinv(MatrixRep &rhs)
static bool Dinv(MatRepSym< T, 2 > &rep)
static bool Dinv(MatrixRep &rhs)
Matrix Inverter class Class to specialize calls to Dinv.
static bool Dinv(MatrixRep &rhs)
matrix inversion for a generic square matrix using LU factorization (code originally from CERNLIB and...
static void InvertBunchKaufman(MatRepSym< T, idim > &rhs, int &ifail)
Bunch-Kaufman method for inversion of symmetric matrices.
static bool Dinv(MatRepSym< T, idim > &rhs)
symmetric matrix inversion using Bunch-kaufman pivoting method implementation in Math/MatrixInversion...
static int DfactMatrix(MatRepStd< T, idim, n > &rhs, T &det, unsigned int *work)
LU Factorization method for inversion of general square matrices (see implementation in Math/MatrixIn...
static int DfinvMatrix(MatRepStd< T, idim, n > &rhs, unsigned int *work)
LU inversion of general square matrices.
Expression wrapper class for Matrix objects.
MatRepSym Matrix storage representation for a symmetric matrix of dimension NxN This class is a templ...
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...