| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

MatrixManip.h

Go to the documentation of this file.
00001 // $Id: MatrixManip.h,v 1.2 2007/07/10 07:25:53 cattanem Exp $
00002 #ifndef LHCBMATH_MATRIXMANIP_H 
00003 #define LHCBMATH_MATRIXMANIP_H 1
00004 
00005 // Include files
00006 
00007 #include "Math/SMatrix.h"
00008 
00016 namespace Gaudi 
00017 {
00018   
00019   namespace Math {
00020 
00021     using namespace ROOT::Math;
00022 
00033     template <typename M>  
00034     SMatrix<typename M::value_type, M::kRows, M::kRows, 
00035             MatRepSym<typename M::value_type, M::kRows> > Symmetrize(const M& rhs) {
00036 
00037       SMatrix<typename M::value_type, M::kRows, M::kRows, 
00038         MatRepSym<typename M::value_type, M::kRows> > result;
00039     
00040       for ( unsigned int i = 0; i < M::kRows; ++i ) {
00041         for ( unsigned int j = 0; j < M::kRows; ++j ) {
00042           if (i<=j) result(i,j) = rhs(i,j);
00043         }
00044       }
00045       return result;
00046     }
00047 
00048   }
00049 }
00050 
00051 #endif // LHCB_MATRIXMANIP_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:02:57 2011 for LHCbMath by doxygen 1.4.7