Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
LaOuterProduct.h
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 #ifndef MA_LaOuterProd_H_
11 #define MA_LaOuterProd_H_
12 
13 
14 
16 #include "Minuit2/ABSum.h"
17 #include "Minuit2/LAVector.h"
18 #include "Minuit2/LASymMatrix.h"
19 
20 namespace ROOT {
21 
22  namespace Minuit2 {
23 
24 
25 /// LAPACK Algebra function
26 /// specialize the Outer_product function for LAVector;
27 
28 inline ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, double>, double>, double> Outer_product(const ABObj<vec, LAVector, double>& obj) {
29 // std::cout<<"ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, double>, double>, double> Outer_product(const ABObj<vec, LAVector, double>& obj)"<<std::endl;
30  return ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, double>, double>, double>(VectorOuterProduct<ABObj<vec, LAVector, double>, double>(obj));
31 }
32 
33 // f*outer
34 template<class T>
35 inline ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator*(T f, const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj) {
36 // std::cout<<"ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator*(T f, const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj)"<<std::endl;
37  return ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>(obj.Obj(), obj.f()*f);
38 }
39 
40 // outer/f
41 template<class T>
42 inline ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator/(const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj, T f) {
43 // std::cout<<"ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator/(const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj, T f)"<<std::endl;
44  return ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>(obj.Obj(), obj.f()/f);
45 }
46 
47 // -outer
48 template<class T>
49 inline ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator-(const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj) {
50 // std::cout<<"ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator/(const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj, T f)"<<std::endl;
51  return ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>(obj.Obj(), T(-1.)*obj.f());
52 }
53 
54 void Outer_prod(LASymMatrix&, const LAVector&, double f = 1.);
55 
56  } // namespace Minuit2
57 
58 } // namespace ROOT
59 
60 #endif //MA_LaOuterProd_H_