Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:23

0001 // @(#)root/minuit2:$Id$
0002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005
0003 
0004 /**********************************************************************
0005  *                                                                    *
0006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
0007  *                                                                    *
0008  **********************************************************************/
0009 
0010 #ifndef MA_LaOuterProd_H_
0011 #define MA_LaOuterProd_H_
0012 
0013 #include "Minuit2/VectorOuterProduct.h"
0014 #include "Minuit2/ABSum.h"
0015 #include "Minuit2/LAVector.h"
0016 #include "Minuit2/LASymMatrix.h"
0017 
0018 namespace ROOT {
0019 
0020 namespace Minuit2 {
0021 
0022 ///    LAPACK Algebra function
0023 ///    specialize the Outer_product function for LAVector;
0024 
0025 inline ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, double>, double>, double>
0026 Outer_product(const ABObj<vec, LAVector, double> &obj)
0027 {
0028    //   std::cout<<"ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, double>, double>, double> Outer_product(const
0029    //   ABObj<vec, LAVector, double>& obj)"<<std::endl;
0030    return ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, double>, double>, double>(
0031       VectorOuterProduct<ABObj<vec, LAVector, double>, double>(obj));
0032 }
0033 
0034 // f*outer
0035 template <class T>
0036 inline ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>
0037 operator*(T f, const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> &obj)
0038 {
0039    //   std::cout<<"ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator*(T f, const ABObj<sym,
0040    //   VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj)"<<std::endl;
0041    return ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>(obj.Obj(), obj.f() * f);
0042 }
0043 
0044 // outer/f
0045 template <class T>
0046 inline ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>
0047 operator/(const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> &obj, T f)
0048 {
0049    //   std::cout<<"ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator/(const ABObj<sym,
0050    //   VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj, T f)"<<std::endl;
0051    return ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>(obj.Obj(), obj.f() / f);
0052 }
0053 
0054 // -outer
0055 template <class T>
0056 inline ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>
0057 operator-(const ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> &obj)
0058 {
0059    //   std::cout<<"ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T> operator/(const ABObj<sym,
0060    //   VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>& obj, T f)"<<std::endl;
0061    return ABObj<sym, VectorOuterProduct<ABObj<vec, LAVector, T>, T>, T>(obj.Obj(), T(-1.) * obj.f());
0062 }
0063 
0064 void Outer_prod(LASymMatrix &, const LAVector &, double f = 1.);
0065 
0066 } // namespace Minuit2
0067 
0068 } // namespace ROOT
0069 
0070 #endif // MA_LaOuterProd_H_