Logo ROOT   6.08/07
Reference Guide
MnEigen.cxx
Go to the documentation of this file.
1 // @(#)root/minuit2:$Id$
2 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7  * *
8  **********************************************************************/
9 
10 #include "Minuit2/MnEigen.h"
12 #include "Minuit2/MnMatrix.h"
13 
14 namespace ROOT {
15 
16  namespace Minuit2 {
17 
18 
19 LAVector eigenvalues(const LASymMatrix&);
20 
21 std::vector<double> MnEigen::operator()(const MnUserCovariance& covar) const {
22  // wrapper to calculate eigenvalues of the covariance matrix using mneigen function
23 
24  LASymMatrix cov(covar.Nrow());
25  for(unsigned int i = 0; i < covar.Nrow(); i++)
26  for(unsigned int j = i; j < covar.Nrow(); j++)
27  cov(i,j) = covar(i,j);
28 
29  LAVector eigen = eigenvalues(cov);
30 
31  std::vector<double> result(eigen.Data(), eigen.Data()+covar.Nrow());
32  return result;
33 }
34 
35  } // namespace Minuit2
36 
37 } // namespace ROOT
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:51
std::vector< double > operator()(const MnUserCovariance &) const
calculate the eigenvalues
Definition: MnEigen.cxx:21
const double * Data() const
Definition: LAVector.h:194
LAVector eigenvalues(const LASymMatrix &mat)
double result[121]
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...