Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::Inverter< idim, n > Class Template Reference

template<unsigned int idim, unsigned int n = idim>
class ROOT::Math::Inverter< idim, n >

Matrix Inverter class Class to specialize calls to Dinv.

Dinv computes the inverse of a square matrix if dimension idim and order n. The content of the matrix will be replaced by its inverse. In case the inversion fails, the matrix content is destroyed. Invert specializes Dinv by the matrix order. E.g. if the order of the matrix is two, the routine Inverter<2> is called which implements Cramers rule.

Author
T. Glebe

Definition at line 69 of file Dinv.h.

Static Public Member Functions

template<class T >
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/MatrixInversion.icc)
 
template<class T >
static int DfinvMatrix (MatRepStd< T, idim, n > &rhs, unsigned int *work)
 LU inversion of general square matrices.
 
template<class T >
static bool Dinv (MatRepSym< T, idim > &rhs)
 symmetric matrix inversion using Bunch-kaufman pivoting method implementation in Math/MatrixInversion.icc
 
template<class MatrixRep >
static bool Dinv (MatrixRep &rhs)
 matrix inversion for a generic square matrix using LU factorization (code originally from CERNLIB and then ported in C++ for CLHEP) implementation is in file Math/MatrixInversion.icc
 
template<class T >
static void InvertBunchKaufman (MatRepSym< T, idim > &rhs, int &ifail)
 Bunch-Kaufman method for inversion of symmetric matrices.
 

#include <Math/Dinv.h>

Member Function Documentation

◆ DfactMatrix()

template<unsigned int idim, unsigned int n>
template<class T >
int ROOT::Math::Inverter< idim, n >::DfactMatrix ( MatRepStd< T, idim, n > &  rhs,
T &  det,
unsigned int work 
)
static

LU Factorization method for inversion of general square matrices (see implementation in Math/MatrixInversion.icc)

LU factorization : code originally from CERNLIB dfact routine and ported in C++ for CLHEP.

Definition at line 447 of file MatrixInversion.icc.

◆ DfinvMatrix()

template<unsigned int idim, unsigned int n>
template<class T >
int ROOT::Math::Inverter< idim, n >::DfinvMatrix ( MatRepStd< T, idim, n > &  rhs,
unsigned int ir 
)
static

LU inversion of general square matrices.

Inversion for General square matrices.

To be called after DFactMatrix (see implementation in Math/MatrixInversion.icc)

Code from dfinv routine from CERNLIB Assumed first the LU decomposition via DfactMatrix function

taken from CLHEP : L. Moneta May 2006

Definition at line 577 of file MatrixInversion.icc.

◆ Dinv() [1/2]

template<unsigned int idim, unsigned int n = idim>
template<class T >
static bool ROOT::Math::Inverter< idim, n >::Dinv ( MatRepSym< T, idim > &  rhs)
inlinestatic

symmetric matrix inversion using Bunch-kaufman pivoting method implementation in Math/MatrixInversion.icc

Definition at line 98 of file Dinv.h.

◆ Dinv() [2/2]

template<unsigned int idim, unsigned int n = idim>
template<class MatrixRep >
static bool ROOT::Math::Inverter< idim, n >::Dinv ( MatrixRep &  rhs)
inlinestatic

matrix inversion for a generic square matrix using LU factorization (code originally from CERNLIB and then ported in C++ for CLHEP) implementation is in file Math/MatrixInversion.icc

Definition at line 75 of file Dinv.h.

◆ InvertBunchKaufman()

template<unsigned int idim, unsigned int N>
template<class T >
void ROOT::Math::Inverter< idim, N >::InvertBunchKaufman ( MatRepSym< T, idim > &  rhs,
int ifail 
)
static

Bunch-Kaufman method for inversion of symmetric matrices.

General Inversion for a symmetric matrix Bunch-Kaufman diagonal pivoting method It is decribed in J.R.

Bunch, L. Kaufman (1977). "Some Stable Methods for Calculating Inertia and Solving Symmetric Linear Systems", Math. Comp. 31, p. 162-179. or in Gene H. Golub, /Charles F. van Loan, "Matrix Computations" (the second edition has a bug.) and implemented in "lapack" Mario Stanke, 09/97

Definition at line 40 of file MatrixInversion.icc.


The documentation for this class was generated from the following files: