Revision 5095c7e7b2a1776378b1e4fd5a505d675ba32a63 authored by Pere Mato on 17 January 2015, 08:47:04 UTC, committed by Pere Mato on 17 January 2015, 08:47:04 UTC
1 parent 716a06a
MnEigen.cxx
// @(#)root/minuit2:$Id$
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
/**********************************************************************
* *
* Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
* *
**********************************************************************/
#include "Minuit2/MnEigen.h"
#include "Minuit2/MnUserCovariance.h"
#include "Minuit2/MnMatrix.h"
namespace ROOT {
namespace Minuit2 {
LAVector eigenvalues(const LASymMatrix&);
std::vector<double> MnEigen::operator()(const MnUserCovariance& covar) const {
// wrapper to calculate eigenvalues of the covariance matrix using mneigen function
LASymMatrix cov(covar.Nrow());
for(unsigned int i = 0; i < covar.Nrow(); i++)
for(unsigned int j = i; j < covar.Nrow(); j++)
cov(i,j) = covar(i,j);
LAVector eigen = eigenvalues(cov);
std::vector<double> result(eigen.Data(), eigen.Data()+covar.Nrow());
return result;
}
} // namespace Minuit2
} // namespace ROOT
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...