Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
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
14namespace ROOT {
15
16namespace Minuit2 {
17
18std::vector<double> MnEigen::operator()(const MnUserCovariance &covar) const
19{
20 // wrapper to calculate eigenvalues of the covariance matrix using mneigen function
21
22 MnAlgebraicSymMatrix cov(covar.Nrow());
23 for (unsigned int i = 0; i < covar.Nrow(); i++)
24 for (unsigned int j = i; j < covar.Nrow(); j++)
25 cov(i, j) = covar(i, j);
26
27 MnAlgebraicVector eigen = eigenvalues(cov);
28
29 std::vector<double> result(eigen.Data(), eigen.Data() + covar.Nrow());
30 return result;
31}
32
33} // namespace Minuit2
34
35} // namespace ROOT
const double * Data() const
Definition MnMatrix.h:1028
std::vector< double > operator()(const MnUserCovariance &) const
calculate the eigenvalues
Definition MnEigen.cxx:18
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...
LAVector eigenvalues(const LASymMatrix &)
Definition MnMatrix.cxx:602
LAVector MnAlgebraicVector
Definition MnMatrixfwd.h:22
LASymMatrix MnAlgebraicSymMatrix
Definition MnMatrixfwd.h:21