Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:03:28

0001 // -*- C++ -*-
0002 // ---------------------------------------------------------------------------
0003 //
0004 // This file is a part of the CLHEP - a Class Library for High Energy Physics.
0005 // 
0006 // This software written by Nobu Katayama and Mike Smyth, Cornell University.
0007 //
0008 
0009 namespace CLHEP {
0010 
0011 // swap
0012 //
0013 inline void HepGenMatrix::swap(int &i,int &j) {int t=i;i=j;j=t;}
0014 #ifdef DISABLE_ALLOC
0015 inline void HepGenMatrix::swap(std::vector<double >& i, std::vector<double >& j) {
0016   std::vector<double > t=i;i=j;j=t;
0017 }
0018 #else
0019 inline void HepGenMatrix::swap(std::vector<double,Alloc<double,25> >& i, std::vector<double,Alloc<double,25> >& j) {
0020   std::vector<double,Alloc<double,25> > t=i;i=j;j=t;
0021 }
0022 #endif
0023 
0024 //
0025 // operator [] (I cannot make it virtual because return types are different.)
0026 // Therefore I will have to use the virtual operator (,).
0027 //
0028 inline double &HepGenMatrix::HepGenMatrix_row::operator[](int c) {
0029   return _a(_r+1,c+1);
0030 }
0031 
0032 inline const double &HepGenMatrix::HepGenMatrix_row_const::
0033 operator[](int c) const {
0034   return _a(_r+1,c+1);
0035 }
0036 
0037 inline HepGenMatrix::HepGenMatrix_row HepGenMatrix::operator[](int r) {
0038   HepGenMatrix_row b(*this,r); 
0039   return b;
0040 }
0041 
0042 inline const HepGenMatrix::HepGenMatrix_row_const HepGenMatrix::
0043 operator[](int r) const{
0044   HepGenMatrix_row_const b(*this,r); 
0045   return b;
0046 }
0047 
0048 inline HepGenMatrix::HepGenMatrix_row::HepGenMatrix_row(HepGenMatrix&a,int r) 
0049 : _a(a) {
0050   _r = r;
0051 }
0052 
0053 inline HepGenMatrix::HepGenMatrix_row_const::
0054 HepGenMatrix_row_const (const HepGenMatrix&a, int r) 
0055    : _a(a) {
0056   _r = r;
0057 }
0058 
0059 
0060 }  // namespace CLHEP
0061 
0062 
0063 // -----------------------------------------------------------------
0064 
0065