BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ROOT::Minuit2::LASymMatrix Class Reference

Description

Class describing a symmetric matrix of size n. The size is specified as a run-time argument passed in the constructor. The class uses expression templates for the operations and functions. Only the independent data are kept in the fdata array of size n*(n+1)/2 containing the lower triangular data

Definition at line 51 of file LASymMatrix.h.

Public Types

typedef sym Type
 

Public Member Functions

template<class A , class T >
 LASymMatrix (const ABObj< sym, ABObj< sym, A, T >, T > &something)
 
template<class A , class B , class T >
 LASymMatrix (const ABObj< sym, ABSum< ABObj< sym, A, T >, ABObj< sym, B, T > >, T > &sum)
 
template<class A , class T >
 LASymMatrix (const ABObj< sym, ABSum< ABObj< sym, LASymMatrix, T >, ABObj< sym, A, T > >, T > &sum)
 
template<class A , class T >
 LASymMatrix (const ABObj< sym, ABSum< ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T >, ABObj< sym, A, T > >, T > &sum)
 
template<class A , class T >
 LASymMatrix (const ABObj< sym, ABSum< ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, T >, T >, T >, ABObj< sym, A, T > >, T > &sum)
 
template<class T >
 LASymMatrix (const ABObj< sym, LASymMatrix, T > &v)
 
template<class T >
 LASymMatrix (const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &inv)
 
 LASymMatrix (const ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, double >, double >, double > &)
 
 LASymMatrix (const LASymMatrix &v)
 
 LASymMatrix (unsigned int n)
 
 ~LASymMatrix ()
 
double * Data ()
 
const double * Data () const
 
unsigned int Ncol () const
 
unsigned int Nrow () const
 
double & operator() (unsigned int row, unsigned int col)
 
double operator() (unsigned int row, unsigned int col) const
 
LASymMatrixoperator*= (double scal)
 
template<class A , class T >
LASymMatrixoperator+= (const ABObj< sym, A, T > &m)
 
template<class T >
LASymMatrixoperator+= (const ABObj< sym, LASymMatrix, T > &m)
 
template<class T >
LASymMatrixoperator+= (const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &m)
 
template<class T >
LASymMatrixoperator+= (const ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, T >, T >, T > &m)
 
LASymMatrixoperator+= (const LASymMatrix &m)
 
LASymMatrixoperator-= (const LASymMatrix &m)
 
template<class A , class T >
LASymMatrixoperator= (const ABObj< sym, ABObj< sym, A, T >, T > &something)
 
template<class A , class B , class T >
LASymMatrixoperator= (const ABObj< sym, ABSum< ABObj< sym, A, T >, ABObj< sym, B, T > >, T > &sum)
 
template<class A , class T >
LASymMatrixoperator= (const ABObj< sym, ABSum< ABObj< sym, LASymMatrix, T >, ABObj< sym, A, T > >, T > &sum)
 
template<class T >
LASymMatrixoperator= (const ABObj< sym, LASymMatrix, T > &v)
 
template<class T >
LASymMatrixoperator= (const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &inv)
 
LASymMatrixoperator= (const ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, double >, double >, double > &)
 
LASymMatrixoperator= (const LASymMatrix &v)
 
unsigned int size () const
 

Private Member Functions

 LASymMatrix ()
 

Private Attributes

double * fData
 
unsigned int fNRow
 
unsigned int fSize
 

Member Typedef Documentation

◆ Type

Definition at line 59 of file LASymMatrix.h.

Constructor & Destructor Documentation

◆ LASymMatrix() [1/11]

ROOT::Minuit2::LASymMatrix::LASymMatrix ( )
inlineprivate

Definition at line 55 of file LASymMatrix.h.

55 : fSize(0), fNRow(0), fData(0) {}

Referenced by operator+=().

◆ LASymMatrix() [2/11]

ROOT::Minuit2::LASymMatrix::LASymMatrix ( unsigned int  n)
inline

Definition at line 61 of file LASymMatrix.h.

61  : fSize(n*(n+1)/2), fNRow(n), fData((double*)StackAllocatorHolder::Get().Allocate(sizeof(double)*n*(n+1)/2)) {
62 // assert(fSize>0);
63  memset(fData, 0, fSize*sizeof(double));
64 // std::cout<<"LASymMatrix(unsigned int n), n= "<<n<<std::endl;
65  }
static StackAllocator & Get()

References fData, and fSize.

◆ ~LASymMatrix()

ROOT::Minuit2::LASymMatrix::~LASymMatrix ( )
inline

Definition at line 67 of file LASymMatrix.h.

67  {
68 // std::cout<<"~LASymMatrix()"<<std::endl;
69 // if(fData) std::cout<<"deleting "<<fSize<<std::endl;
70 // else std::cout<<"no delete"<<std::endl;
71 // if(fData) delete [] fData;
73  }

References ROOT::Minuit2::StackAllocator::Deallocate(), fData, and ROOT::Minuit2::StackAllocatorHolder::Get().

Here is the call graph for this function:

◆ LASymMatrix() [3/11]

ROOT::Minuit2::LASymMatrix::LASymMatrix ( const LASymMatrix v)
inline

Definition at line 75 of file LASymMatrix.h.

75  :
76  fSize(v.size()), fNRow(v.Nrow()), fData((double*)StackAllocatorHolder::Get().Allocate(sizeof(double)*v.size())) {
77 // std::cout<<"LASymMatrix(const LASymMatrix& v)"<<std::endl;
78  memcpy(fData, v.Data(), fSize*sizeof(double));
79  }

References Data(), fData, and fSize.

Here is the call graph for this function:

◆ LASymMatrix() [4/11]

template<class T >
ROOT::Minuit2::LASymMatrix::LASymMatrix ( const ABObj< sym, LASymMatrix, T > &  v)
inline

Definition at line 91 of file LASymMatrix.h.

91  :
92  fSize(v.Obj().size()), fNRow(v.Obj().Nrow()), fData((double*)StackAllocatorHolder::Get().Allocate(sizeof(double)*v.Obj().size())) {
93 // std::cout<<"LASymMatrix(const ABObj<sym, LASymMatrix, T>& v)"<<std::endl;
94  //std::cout<<"allocate "<<fSize<<std::endl;
95  memcpy(fData, v.Obj().Data(), fSize*sizeof(double));
96  Mndscal(fSize, double(v.f()), fData, 1);
97  //std::cout<<"fData= "<<fData[0]<<" "<<fData[1]<<std::endl;
98  }
int Mndscal(unsigned int, double, double *, int)

References ROOT::Minuit2::ABObj< mtype, M, T >::f(), fData, fSize, ROOT::Minuit2::Mndscal(), and ROOT::Minuit2::ABObj< mtype, M, T >::Obj().

Here is the call graph for this function:

◆ LASymMatrix() [5/11]

template<class A , class B , class T >
ROOT::Minuit2::LASymMatrix::LASymMatrix ( const ABObj< sym, ABSum< ABObj< sym, A, T >, ABObj< sym, B, T > >, T > &  sum)
inline

Definition at line 101 of file LASymMatrix.h.

101  : fSize(0), fNRow(0), fData(0) {
102 // std::cout<<"template<class A, class B, class T> LASymMatrix(const ABObj<sym, ABSum<ABObj<sym, A, T>, ABObj<sym, B, T> > >& sum)"<<std::endl;
103 // recursive construction
104  (*this) = sum.Obj().A();
105  (*this) += sum.Obj().B();
106  //std::cout<<"leaving template<class A, class B, class T> LASymMatrix(const ABObj..."<<std::endl;
107  }

◆ LASymMatrix() [6/11]

template<class A , class T >
ROOT::Minuit2::LASymMatrix::LASymMatrix ( const ABObj< sym, ABSum< ABObj< sym, LASymMatrix, T >, ABObj< sym, A, T > >, T > &  sum)
inline

Definition at line 110 of file LASymMatrix.h.

110  : fSize(0), fNRow(0), fData(0) {
111 // std::cout<<"template<class A, class T> LASymMatrix(const ABObj<sym, ABSum<ABObj<sym, LASymMatrix, T>, ABObj<sym, A, T> >,T>& sum)"<<std::endl;
112 
113  // recursive construction
114  //std::cout<<"(*this)=sum.Obj().B();"<<std::endl;
115  (*this)=sum.Obj().B();
116  //std::cout<<"(*this)+=sum.Obj().A();"<<std::endl;
117  (*this)+=sum.Obj().A();
118  //std::cout<<"leaving template<class A, class T> LASymMatrix(const ABObj<sym, ABSum<ABObj<sym, LASymMatrix,.."<<std::endl;
119  }

◆ LASymMatrix() [7/11]

template<class A , class T >
ROOT::Minuit2::LASymMatrix::LASymMatrix ( const ABObj< sym, ABObj< sym, A, T >, T > &  something)
inline

Definition at line 122 of file LASymMatrix.h.

122  : fSize(0), fNRow(0), fData(0) {
123 // std::cout<<"template<class A, class T> LASymMatrix(const ABObj<sym, ABObj<sym, A, T>, T>& something)"<<std::endl;
124  (*this) = something.Obj();
125  (*this) *= something.f();
126  //std::cout<<"leaving template<class A, class T> LASymMatrix(const ABObj<sym, ABObj<sym, A, T>, T>& something)"<<std::endl;
127  }

◆ LASymMatrix() [8/11]

template<class T >
ROOT::Minuit2::LASymMatrix::LASymMatrix ( const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &  inv)
inline

Definition at line 130 of file LASymMatrix.h.

130  : fSize(inv.Obj().Obj().Obj().size()), fNRow(inv.Obj().Obj().Obj().Nrow()), fData((double*)StackAllocatorHolder::Get().Allocate(sizeof(double)*inv.Obj().Obj().Obj().size())) {
131  memcpy(fData, inv.Obj().Obj().Obj().Data(), fSize*sizeof(double));
132  Mndscal(fSize, double(inv.Obj().Obj().f()), fData, 1);
133  Invert(*this);
134  Mndscal(fSize, double(inv.f()), fData, 1);
135  }
int Invert(LASymMatrix &)

References fData, fSize, ROOT::Minuit2::Invert(), and ROOT::Minuit2::Mndscal().

Here is the call graph for this function:

◆ LASymMatrix() [9/11]

template<class A , class T >
ROOT::Minuit2::LASymMatrix::LASymMatrix ( const ABObj< sym, ABSum< ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T >, ABObj< sym, A, T > >, T > &  sum)
inline

Definition at line 138 of file LASymMatrix.h.

138  : fSize(0), fNRow(0), fData(0) {
139 // std::cout<<"template<class A, class T> LASymMatrix(const ABObj<sym, ABSum<ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, T>, T>, T>, ABObj<sym, A, T> >, T>& sum)"<<std::endl;
140 
141  // recursive construction
142  (*this)=sum.Obj().B();
143  (*this)+=sum.Obj().A();
144  //std::cout<<"leaving template<class A, class T> LASymMatrix(const ABObj<sym, ABSum<ABObj<sym, LASymMatrix,.."<<std::endl;
145  }

◆ LASymMatrix() [10/11]

ROOT::Minuit2::LASymMatrix::LASymMatrix ( const ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, double >, double >, double > &  )

◆ LASymMatrix() [11/11]

template<class A , class T >
ROOT::Minuit2::LASymMatrix::LASymMatrix ( const ABObj< sym, ABSum< ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, T >, T >, T >, ABObj< sym, A, T > >, T > &  sum)
inline

Definition at line 150 of file LASymMatrix.h.

150  : fSize(0), fNRow(0), fData(0) {
151 // std::cout<<"template<class A, class T> LASymMatrix(const ABObj<sym, ABSum<ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> ABObj<sym, A, T> >,T>& sum)"<<std::endl;
152 
153  // recursive construction
154  (*this)=sum.Obj().B();
155  (*this)+=sum.Obj().A();
156  //std::cout<<"leaving template<class A, class T> LASymMatrix(const ABObj<sym, ABSum<ABObj<sym, LASymMatrix,.."<<std::endl;
157  }

Member Function Documentation

◆ Data() [1/2]

double* ROOT::Minuit2::LASymMatrix::Data ( )
inline

Definition at line 235 of file LASymMatrix.h.

235 {return fData;}

References fData.

◆ Data() [2/2]

const double* ROOT::Minuit2::LASymMatrix::Data ( ) const
inline

Definition at line 233 of file LASymMatrix.h.

233 {return fData;}

References fData.

Referenced by LASymMatrix(), operator+=(), operator-=(), and operator=().

◆ Ncol()

unsigned int ROOT::Minuit2::LASymMatrix::Ncol ( ) const
inline

Definition at line 241 of file LASymMatrix.h.

241 {return Nrow();}
unsigned int Nrow() const
Definition: LASymMatrix.h:239

References Nrow().

Here is the call graph for this function:

◆ Nrow()

unsigned int ROOT::Minuit2::LASymMatrix::Nrow ( ) const
inline

Definition at line 239 of file LASymMatrix.h.

239 {return fNRow;}

References fNRow.

Referenced by Ncol().

◆ operator()() [1/2]

double& ROOT::Minuit2::LASymMatrix::operator() ( unsigned int  row,
unsigned int  col 
)
inline

Definition at line 225 of file LASymMatrix.h.

225  {
226  assert(row<fNRow && col < fNRow);
227  if(row > col)
228  return fData[col+row*(row+1)/2];
229  else
230  return fData[row+col*(col+1)/2];
231  }

References fData, and fNRow.

◆ operator()() [2/2]

double ROOT::Minuit2::LASymMatrix::operator() ( unsigned int  row,
unsigned int  col 
) const
inline

Definition at line 217 of file LASymMatrix.h.

217  {
218  assert(row<fNRow && col < fNRow);
219  if(row > col)
220  return fData[col+row*(row+1)/2];
221  else
222  return fData[row+col*(col+1)/2];
223  }

References fData, and fNRow.

◆ operator*=()

LASymMatrix& ROOT::Minuit2::LASymMatrix::operator*= ( double  scal)
inline

Definition at line 212 of file LASymMatrix.h.

212  {
213  Mndscal(fSize, scal, fData, 1);
214  return *this;
215  }

References fData, fSize, and ROOT::Minuit2::Mndscal().

Here is the call graph for this function:

◆ operator+=() [1/5]

template<class A , class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator+= ( const ABObj< sym, A, T > &  m)
inline

Definition at line 187 of file LASymMatrix.h.

187  {
188 // std::cout<<"template<class A, class T> LASymMatrix& operator+=(const ABObj<sym, A,T>& m)"<<std::endl;
189  (*this) += LASymMatrix(m);
190  return *this;
191  }

References LASymMatrix().

Here is the call graph for this function:

◆ operator+=() [2/5]

template<class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator+= ( const ABObj< sym, LASymMatrix, T > &  m)
inline

Definition at line 174 of file LASymMatrix.h.

174  {
175 // std::cout<<"template<class T> LASymMatrix& operator+=(const ABObj<sym, LASymMatrix, T>& m)"<<std::endl;
176  assert(fSize==m.Obj().size());
177  if(m.Obj().Data()==fData) {
178  Mndscal(fSize, 1.+double(m.f()), fData, 1);
179  } else {
180  Mndaxpy(fSize, double(m.f()), m.Obj().Data(), 1, fData, 1);
181  }
182  //std::cout<<"fData= "<<fData[0]<<" "<<fData[1]<<std::endl;
183  return *this;
184  }
int Mndaxpy(unsigned int, double, const double *, int, double *, int)

References ROOT::Minuit2::ABObj< mtype, M, T >::f(), fData, fSize, ROOT::Minuit2::Mndaxpy(), ROOT::Minuit2::Mndscal(), and ROOT::Minuit2::ABObj< mtype, M, T >::Obj().

Here is the call graph for this function:

◆ operator+=() [3/5]

template<class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator+= ( const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &  m)
inline

Definition at line 194 of file LASymMatrix.h.

194  {
195 // std::cout<<"template<class T> LASymMatrix& operator+=(const ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, T>, T>, T>& m)"<<std::endl;
196  assert(fNRow > 0);
197  LASymMatrix tmp(m.Obj().Obj());
198  Invert(tmp);
199  tmp *= double(m.f());
200  (*this) += tmp;
201  return *this;
202  }

References fNRow, and ROOT::Minuit2::Invert().

Here is the call graph for this function:

◆ operator+=() [4/5]

template<class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator+= ( const ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, T >, T >, T > &  m)
inline

Definition at line 205 of file LASymMatrix.h.

205  {
206 // std::cout<<"template<class T> LASymMatrix& operator+=(const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>&"<<std::endl;
207  assert(fNRow > 0);
208  Outer_prod(*this, m.Obj().Obj().Obj(), m.f()*m.Obj().Obj().f()*m.Obj().Obj().f());
209  return *this;
210  }
void Outer_prod(LASymMatrix &, const LAVector &, double f=1.)

References fNRow, and ROOT::Minuit2::Outer_prod().

Here is the call graph for this function:

◆ operator+=() [5/5]

LASymMatrix& ROOT::Minuit2::LASymMatrix::operator+= ( const LASymMatrix m)
inline

Definition at line 159 of file LASymMatrix.h.

159  {
160 // std::cout<<"LASymMatrix& operator+=(const LASymMatrix& m)"<<std::endl;
161  assert(fSize==m.size());
162  Mndaxpy(fSize, 1., m.Data(), 1, fData, 1);
163  return *this;
164  }

References Data(), fData, fSize, ROOT::Minuit2::Mndaxpy(), and size().

Here is the call graph for this function:

◆ operator-=()

LASymMatrix& ROOT::Minuit2::LASymMatrix::operator-= ( const LASymMatrix m)
inline

Definition at line 166 of file LASymMatrix.h.

166  {
167 // std::cout<<"LASymMatrix& operator-=(const LASymMatrix& m)"<<std::endl;
168  assert(fSize==m.size());
169  Mndaxpy(fSize, -1., m.Data(), 1, fData, 1);
170  return *this;
171  }

References Data(), fData, fSize, ROOT::Minuit2::Mndaxpy(), and size().

Here is the call graph for this function:

◆ operator=() [1/7]

template<class A , class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator= ( const ABObj< sym, ABObj< sym, A, T >, T > &  something)
inline

Definition at line 268 of file LASymMatrix.h.

268  {
269  //std::cout<<"template<class A, class T> LASymMatrix& operator=(const ABObj<sym, ABObj<sym, A, T>, T>& something)"<<std::endl;
270  if(fSize == 0 && fData == 0) {
271  (*this) = something.Obj();
272  (*this) *= something.f();
273  } else {
274  LASymMatrix tmp(something.Obj());
275  tmp *= something.f();
276  assert(fSize == tmp.size());
277  memcpy(fData, tmp.Data(), fSize*sizeof(double));
278  }
279  //std::cout<<"template<class A, class T> LASymMatrix& operator=(const ABObj<sym, ABObj<sym, A, T>, T>& something)"<<std::endl;
280  return *this;
281  }

References Data(), fData, fSize, and size().

Here is the call graph for this function:

◆ operator=() [2/7]

template<class A , class B , class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator= ( const ABObj< sym, ABSum< ABObj< sym, A, T >, ABObj< sym, B, T > >, T > &  sum)
inline

Definition at line 284 of file LASymMatrix.h.

284  {
285  //std::cout<<"template<class A, class B, class T> LASymMatrix& operator=(const ABObj<sym, ABSum<ABObj<sym, A, T>, ABObj<sym, B, T> >,T>& sum)"<<std::endl;
286  // recursive construction
287  if(fSize == 0 && fData == 0) {
288  (*this) = sum.Obj().A();
289  (*this) += sum.Obj().B();
290  (*this) *= sum.f();
291  } else {
292  LASymMatrix tmp(sum.Obj().A());
293  tmp += sum.Obj().B();
294  tmp *= sum.f();
295  assert(fSize == tmp.size());
296  memcpy(fData, tmp.Data(), fSize*sizeof(double));
297  }
298  return *this;
299  }

References Data(), fData, fSize, and size().

Here is the call graph for this function:

◆ operator=() [3/7]

template<class A , class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator= ( const ABObj< sym, ABSum< ABObj< sym, LASymMatrix, T >, ABObj< sym, A, T > >, T > &  sum)
inline

Definition at line 302 of file LASymMatrix.h.

302  {
303  //std::cout<<"template<class A, class T> LASymMatrix& operator=(const ABObj<sym, ABSum<ABObj<sym, LASymMatrix, T>, ABObj<sym, A, T> >,T>& sum)"<<std::endl;
304 
305  if(fSize == 0 && fData == 0) {
306  //std::cout<<"fSize == 0 && fData == 0"<<std::endl;
307  (*this) = sum.Obj().B();
308  (*this) += sum.Obj().A();
309  (*this) *= sum.f();
310  } else {
311  //std::cout<<"creating tmp variable"<<std::endl;
312  LASymMatrix tmp(sum.Obj().B());
313  tmp += sum.Obj().A();
314  tmp *= sum.f();
315  assert(fSize == tmp.size());
316  memcpy(fData, tmp.Data(), fSize*sizeof(double));
317  }
318  //std::cout<<"leaving LASymMatrix& operator=(const ABObj<sym, ABSum<ABObj<sym, LASymMatrix..."<<std::endl;
319  return *this;
320  }

References Data(), fData, fSize, and size().

Here is the call graph for this function:

◆ operator=() [4/7]

template<class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator= ( const ABObj< sym, LASymMatrix, T > &  v)
inline

Definition at line 252 of file LASymMatrix.h.

252  {
253  //std::cout<<"template<class T> LASymMatrix& operator=(ABObj<sym, LASymMatrix, T>& v)"<<std::endl;
254  if(fSize == 0 && fData == 0) {
255  fSize = v.Obj().size();
256  fNRow = v.Obj().Nrow();
257  fData = (double*)StackAllocatorHolder::Get().Allocate(sizeof(double)*fSize);
258  } else {
259  assert(fSize == v.Obj().size());
260  }
261  //std::cout<<"fData= "<<fData[0]<<" "<<fData[1]<<std::endl;
262  memcpy(fData, v.Obj().Data(), fSize*sizeof(double));
263  (*this) *= v.f();
264  return *this;
265  }
void * Allocate(size_t nBytes)

References ROOT::Minuit2::StackAllocator::Allocate(), ROOT::Minuit2::ABObj< mtype, M, T >::f(), fData, fNRow, fSize, ROOT::Minuit2::StackAllocatorHolder::Get(), and ROOT::Minuit2::ABObj< mtype, M, T >::Obj().

Here is the call graph for this function:

◆ operator=() [5/7]

template<class T >
LASymMatrix& ROOT::Minuit2::LASymMatrix::operator= ( const ABObj< sym, MatrixInverse< sym, ABObj< sym, LASymMatrix, T >, T >, T > &  inv)
inline

Definition at line 323 of file LASymMatrix.h.

323  {
324  if(fSize == 0 && fData == 0) {
325  fSize = inv.Obj().Obj().Obj().size();
326  fNRow = inv.Obj().Obj().Obj().Nrow();
327  fData = (double*)StackAllocatorHolder::Get().Allocate(sizeof(double)*fSize);
328  memcpy(fData, inv.Obj().Obj().Obj().Data(), fSize*sizeof(double));
329  (*this) *= inv.Obj().Obj().f();
330  Invert(*this);
331  (*this) *= inv.f();
332  } else {
333  LASymMatrix tmp(inv.Obj().Obj());
334  Invert(tmp);
335  tmp *= double(inv.f());
336  assert(fSize == tmp.size());
337  memcpy(fData, tmp.Data(), fSize*sizeof(double));
338  }
339  return *this;
340  }

References ROOT::Minuit2::StackAllocator::Allocate(), Data(), fData, fNRow, fSize, ROOT::Minuit2::StackAllocatorHolder::Get(), ROOT::Minuit2::Invert(), and size().

Here is the call graph for this function:

◆ operator=() [6/7]

LASymMatrix& ROOT::Minuit2::LASymMatrix::operator= ( const ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, double >, double >, double > &  )

◆ operator=() [7/7]

LASymMatrix& ROOT::Minuit2::LASymMatrix::operator= ( const LASymMatrix v)
inline

Definition at line 81 of file LASymMatrix.h.

81  {
82 // std::cout<<"LASymMatrix& operator=(const LASymMatrix& v)"<<std::endl;
83 // std::cout<<"fSize= "<<fSize<<std::endl;
84 // std::cout<<"v.size()= "<<v.size()<<std::endl;
85  assert(fSize == v.size());
86  memcpy(fData, v.Data(), fSize*sizeof(double));
87  return *this;
88  }

References Data(), fData, fSize, and size().

Here is the call graph for this function:

◆ size()

unsigned int ROOT::Minuit2::LASymMatrix::size ( ) const
inline

Definition at line 237 of file LASymMatrix.h.

237 {return fSize;}

References fSize.

Referenced by operator+=(), operator-=(), and operator=().

Member Data Documentation

◆ fData

double* ROOT::Minuit2::LASymMatrix::fData
private

◆ fNRow

unsigned int ROOT::Minuit2::LASymMatrix::fNRow
private

Definition at line 246 of file LASymMatrix.h.

Referenced by Nrow(), operator()(), operator+=(), and operator=().

◆ fSize

unsigned int ROOT::Minuit2::LASymMatrix::fSize
private

Definition at line 245 of file LASymMatrix.h.

Referenced by LASymMatrix(), operator*=(), operator+=(), operator-=(), operator=(), and size().


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