Logo ROOT   6.08/07
Reference Guide
LaVtMVSimilarity.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/LASymMatrix.h"
11 #include "Minuit2/LAVector.h"
12 #include "Minuit2/LaProd.h"
13 
14 namespace ROOT {
15 
16  namespace Minuit2 {
17 
18 
19 double mnddot(unsigned int, const double*, int, const double*, int);
20 
21 double similarity(const LAVector& avec, const LASymMatrix& mat) {
22  // calculate the similarity vector-matrix product: V^T M V
23  // use matrix product and then dot function (using mnddot)
24 
25  LAVector tmp = mat*avec;
26 
27  double value = mnddot(avec.size(), avec.Data(), 1, tmp.Data(), 1);
28  return value;
29 }
30 
31  } // namespace Minuit2
32 
33 } // namespace ROOT
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:51
double mnddot(unsigned int, const double *, int, const double *, int)
Definition: mnddot.cxx:20
double similarity(const LAVector &, const LASymMatrix &)
const double * Data() const
Definition: LAVector.h:194