CMS 3D CMS Logo

Public Member Functions

ROOT::Math::CholeskyDecompHelpers::_solver< F, 2, V > Struct Template Reference

struct to solve a linear system using its Cholesky decomposition (N=2) More...

#include <CholeskyDecomp.h>

List of all members.

Public Member Functions

void operator() (V &rhs, const F *l) const
 method to solve the linear system

Detailed Description

template<class F, class V>
struct ROOT::Math::CholeskyDecompHelpers::_solver< F, 2, V >

struct to solve a linear system using its Cholesky decomposition (N=2)

Definition at line 682 of file CholeskyDecomp.h.


Member Function Documentation

template<class F , class V >
void ROOT::Math::CholeskyDecompHelpers::_solver< F, 2, V >::operator() ( V &  rhs,
const F *  l 
) const [inline]

method to solve the linear system

Definition at line 685 of file CholeskyDecomp.h.

      {
         // solve Ly = rhs
         const F y0 = rhs[0] * l[0];
         const F y1 = (rhs[1]-l[1]*y0)*l[2];
         // solve L^Tx = y, and put x into rhs
         rhs[1] = (y1)*l[2];
         rhs[0] = (y0-(l[1]*rhs[1]))*l[0];
      }