Logo ROOT  
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
14namespace ROOT {
15
16namespace Minuit2 {
17
18LAVector eigenvalues(const LASymMatrix &);
19
20std::vector<double> MnEigen::operator()(const MnUserCovariance &covar) const
21{
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:45
const double * Data() const
Definition: LAVector.h:227
std::vector< double > operator()(const MnUserCovariance &) const
calculate the eigenvalues
Definition: MnEigen.cxx:20
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...
LAVector eigenvalues(const LASymMatrix &mat)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.