10#ifndef ROOT_Minuit2_LASymMatrix
11#define ROOT_Minuit2_LASymMatrix
29int Mndaxpy(
unsigned int,
double,
const double *,
int,
double *,
int);
30int Mndscal(
unsigned int,
double,
double *,
int);
74 std::memcpy(
fData,
v.Data(),
fSize *
sizeof(
double));
85 std::memcpy(
fData,
v.Data(),
fSize *
sizeof(
double));
96 std::memcpy(
fData,
v.Obj().Data(),
fSize *
sizeof(
double));
101 template <
class A,
class B,
class T>
106 (*this) =
sum.Obj().A();
107 (*this) +=
sum.Obj().B();
111 template <
class A,
class T>
120 (*this) =
sum.Obj().B();
122 (*this) +=
sum.Obj().A();
127 template <
class A,
class T>
132 (*this) = something.Obj();
133 (*this) *= something.f();
143 std::memcpy(
fData,
inv.Obj().Obj().Obj().Data(),
fSize *
sizeof(
double));
149 template <
class A,
class T>
151 const ABObj<
sym,
ABSum<
ABObj<
sym,
MatrixInverse<
sym,
ABObj<sym, LASymMatrix, T>, T>, T>,
ABObj<sym, A, T>>, T>
159 (*this) =
sum.Obj().B();
160 (*this) +=
sum.Obj().A();
167 template <
class A,
class T>
169 const ABObj<
sym,
ABSum<
ABObj<
sym,
VectorOuterProduct<
ABObj<vec, LAVector, T>, T>, T>,
ABObj<sym, A, T>>, T> &
sum)
176 (*this) =
sum.Obj().B();
177 (*this) +=
sum.Obj().A();
185 assert(
fSize ==
m.size());
193 assert(
fSize ==
m.size());
202 assert(
fSize ==
m.Obj().size());
203 if (
m.Obj().Data() ==
fData) {
212 template <
class A,
class T>
239 Outer_prod(*
this,
m.Obj().Obj().Obj(),
m.f() *
m.Obj().Obj().f() *
m.Obj().Obj().f());
253 return fData[col + row * (row + 1) / 2];
255 return fData[row + col * (col + 1) / 2];
262 return fData[col + row * (row + 1) / 2];
264 return fData[row + col * (col + 1) / 2];
292 assert(
fSize ==
v.Obj().size());
295 std::memcpy(
fData,
v.Obj().Data(),
fSize *
sizeof(
double));
300 template <
class A,
class T>
306 (*this) = something.Obj();
307 (*this) *= something.f();
310 tmp *= something.f();
319 template <
class A,
class B,
class T>
326 (*this) =
sum.Obj().A();
327 (*this) +=
sum.Obj().B();
331 tmp +=
sum.Obj().B();
339 template <
class A,
class T>
347 (*this) =
sum.Obj().B();
348 (*this) +=
sum.Obj().A();
353 tmp +=
sum.Obj().A();
366 fSize =
inv.Obj().Obj().Obj().size();
367 fNRow =
inv.Obj().Obj().Obj().Nrow();
369 std::memcpy(
fData,
inv.Obj().Obj().Obj().Data(),
fSize *
sizeof(
double));
370 (*this) *=
inv.Obj().Obj().f();
Class describing a symmetric matrix of size n.
LASymMatrix(const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &inv)
LASymMatrix & operator=(const ABObj< sym, LASymMatrix, T > &v)
LASymMatrix & operator-=(const LASymMatrix &m)
LASymMatrix(const ABObj< sym, ABSum< ABObj< sym, LASymMatrix, T >, ABObj< sym, A, T > >, T > &sum)
double & operator()(unsigned int row, unsigned int col)
const double * Data() const
unsigned int Ncol() const
double operator()(unsigned int row, unsigned int col) const
LASymMatrix & operator=(const LASymMatrix &v)
LASymMatrix & operator+=(const ABObj< sym, LASymMatrix, T > &m)
LASymMatrix(const ABObj< sym, ABSum< ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T >, ABObj< sym, A, T > >, T > &sum)
LASymMatrix(const ABObj< sym, ABSum< ABObj< sym, A, T >, ABObj< sym, B, T > >, T > &sum)
LASymMatrix & operator*=(double scal)
LASymMatrix & operator+=(const ABObj< sym, A, T > &m)
LASymMatrix & operator=(const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &inv)
LASymMatrix(unsigned int n)
LASymMatrix(const ABObj< sym, LASymMatrix, T > &v)
LASymMatrix & operator=(const ABObj< sym, ABSum< ABObj< sym, A, T >, ABObj< sym, B, T > >, T > &sum)
LASymMatrix(const LASymMatrix &v)
unsigned int Nrow() const
LASymMatrix(const ABObj< sym, ABObj< sym, A, T >, T > &something)
LASymMatrix & operator+=(const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &m)
LASymMatrix & operator=(const ABObj< sym, ABSum< ABObj< sym, LASymMatrix, T >, ABObj< sym, A, T > >, T > &sum)
LASymMatrix(const ABObj< sym, ABSum< ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, T >, T >, T >, ABObj< sym, A, T > >, T > &sum)
LASymMatrix & operator+=(const LASymMatrix &m)
LASymMatrix & operator+=(const ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, T >, T >, T > &m)
unsigned int size() const
LASymMatrix & operator=(const ABObj< sym, ABObj< sym, A, T >, T > &something)
static StackAllocator & Get()
void * Allocate(size_t nBytes)
int Invert(LASymMatrix &)
int Mndaxpy(unsigned int, double, const double *, int, double *, int)
int Mndscal(unsigned int, double, double *, int)
void Outer_prod(LASymMatrix &, const LAVector &, double f=1.)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
static uint64_t sum(uint64_t i)