Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:22:11

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 ROOT_Minuit2_LaInverse
0011 #define ROOT_Minuit2_LaInverse
0012 
0013 #include "Minuit2/MatrixInverse.h"
0014 #include "Minuit2/LASymMatrix.h"
0015 
0016 namespace ROOT {
0017 
0018 namespace Minuit2 {
0019 
0020 ///    LAPACK Algebra functions
0021 ///    specialize the Invert function for LASymMatrix
0022 
0023 inline ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double>
0024 Inverse(const ABObj<sym, LASymMatrix, double> &obj)
0025 {
0026    return ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double>(
0027       MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>(obj));
0028 }
0029 
0030 template <class T>
0031 inline ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double>
0032 operator*(T f, const ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double> &inv)
0033 {
0034    return ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double>(inv.Obj(), f * inv.f());
0035 }
0036 
0037 template <class T>
0038 inline ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double>
0039 operator/(const ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double> &inv, T f)
0040 {
0041    return ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double>(inv.Obj(), inv.f() / f);
0042 }
0043 
0044 template <class T>
0045 inline ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double>
0046 operator-(const ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double> &inv)
0047 {
0048    return ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double>(inv.Obj(), T(-1.) * inv.f());
0049 }
0050 
0051 int Invert(LASymMatrix &);
0052 
0053 int Invert_undef_sym(LASymMatrix &);
0054 
0055 /*
0056 template<class M>
0057 inline ABObj<sym, MatrixInverse<sym, ABObj<sym, M, double>, double>, double> Inverse(const ABObj<sym, M, double>& obj) {
0058   return ABObj<sym, MatrixInverse<sym, ABObj<sym, M, double>, double>, double>(MatrixInverse<sym, ABObj<sym, M, double>,
0059 double>(obj));
0060 }
0061 
0062 inline ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>, double> Inverse(const ABObj<sym,
0063 LASymMatrix, double>& obj) { return ABObj<sym, MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>,
0064 double>(MatrixInverse<sym, ABObj<sym, LASymMatrix, double>, double>(obj));
0065 }
0066 */
0067 
0068 } // namespace Minuit2
0069 
0070 } // namespace ROOT
0071 
0072 #endif // ROOT_Minuit2_LaInverse