MnEigen.cxx

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: MnEigen.cxx 20880 2007-11-19 11:23:41Z rdm $
00002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005  
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
00007  *                                                                    *
00008  **********************************************************************/
00009 
00010 #include "Minuit2/MnEigen.h"
00011 #include "Minuit2/MnUserCovariance.h"
00012 #include "Minuit2/MnMatrix.h"
00013 
00014 namespace ROOT {
00015 
00016    namespace Minuit2 {
00017 
00018 
00019 LAVector eigenvalues(const LASymMatrix&);
00020 
00021 std::vector<double> MnEigen::operator()(const MnUserCovariance& covar) const {
00022    // wrapper to calculate eigenvalues of the covariance matrix using mneigen function
00023    
00024    LASymMatrix cov(covar.Nrow());
00025    for(unsigned int i = 0; i < covar.Nrow(); i++)
00026       for(unsigned int j = i; j < covar.Nrow(); j++)
00027          cov(i,j) = covar(i,j);
00028    
00029    LAVector eigen = eigenvalues(cov);
00030    
00031    std::vector<double> result(eigen.Data(), eigen.Data()+covar.Nrow());
00032    return result;
00033 }
00034 
00035    }  // namespace Minuit2
00036 
00037 }  // namespace ROOT

Generated on Tue Jul 5 14:37:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1