ROOT   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
14namespace ROOT {
15
16 namespace Minuit2 {
17
18
19double mnddot(unsigned int, const double*, int, const double*, int);
20
21double 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
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:51
const double * Data() const
Definition: LAVector.h:194
unsigned int size() const
Definition: LAVector.h:198
double mnddot(unsigned int, const double *, int, const double *, int)
Definition: mnddot.cxx:20
double similarity(const LAVector &, const LASymMatrix &)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: StringConv.hxx:21