LaVtMVSimilarity.cxx

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: LaVtMVSimilarity.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/LASymMatrix.h"
00011 #include "Minuit2/LAVector.h"
00012 #include "Minuit2/LaProd.h"
00013 
00014 namespace ROOT {
00015 
00016    namespace Minuit2 {
00017 
00018 
00019 double mnddot(unsigned int, const double*, int, const double*, int);
00020 
00021 double similarity(const LAVector& avec, const LASymMatrix& mat) {
00022    // calculate the similarity vector-matrix product: V^T M V
00023    // use matrix product and then dot function (using mnddot)
00024    
00025    LAVector tmp = mat*avec;
00026    
00027    double value = mnddot(avec.size(), avec.Data(), 1, tmp.Data(), 1);
00028    return value;
00029 }
00030 
00031    }  // namespace Minuit2
00032 
00033 }  // namespace ROOT

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