#include <DifArray.h>
Public Member Functions | |
DifArray (int n, int npar=0) | |
DifArray (const HepVector &v, int npar=0) | |
DifArray (const DifArray &a) | |
~DifArray () | |
DifNumber & | operator[] (int i) |
DifNumber & | operator() (int i) |
DifNumber | fetch (int i) const |
int | nElem () const |
DifArray & | operator= (const DifArray &) |
HepMatrix | jacobian () const |
void | zero (int npar=0) |
void | print () const |
Private Member Functions | |
void | copy (const DifArray &a) |
void | copy (const HepVector &a, int npar=0) |
Private Attributes | |
int | _nElem |
DifNumber * | _pointer |
Definition at line 36 of file DifArray.h.
DifArray::DifArray | ( | int | n, | |
int | npar = 0 | |||
) |
DifArray::DifArray | ( | const HepVector & | v, | |
int | npar = 0 | |||
) |
DifArray::DifArray | ( | const DifArray & | a | ) |
DifArray::~DifArray | ( | ) |
void DifArray::copy | ( | const HepVector & | a, | |
int | npar = 0 | |||
) | [private] |
void DifArray::copy | ( | const DifArray & | a | ) | [private] |
Definition at line 92 of file DifArray.cxx.
References _pointer, genRecEmupikp::i, and nElem().
Referenced by DifArray(), and operator=().
00092 { 00093 assert(nElem()==a.nElem()); 00094 for(int i=0; i<nElem(); i++) {_pointer[i]=a._pointer[i];} 00095 }
DifNumber DifArray::fetch | ( | int | i | ) | const |
HepMatrix DifArray::jacobian | ( | ) | const |
Definition at line 72 of file DifArray.cxx.
References _pointer, genRecEmupikp::i, ganga-rec::j, nElem(), DifNumber::nPar(), and subSeperate::temp.
Referenced by BesVectorErr::covRTPMatrix(), BesPointErr::covRTPMatrix(), BesVectorErr::covRZPMatrix(), BesPointErr::covRZPMatrix(), and TrkHelixUtils::helixFromMomErr().
00072 { 00073 int npar=_pointer[0].nPar(); 00074 HepMatrix temp(nElem(),npar,0); 00075 for(int i=1; i<=nElem(); i++){ 00076 for(int j=1; j<=npar; j++) { 00077 temp(i,j)=_pointer[i-1].derivative(j); 00078 } 00079 } //(int i=1; i<=nElem(); i++) 00080 return temp; 00081 }
int DifArray::nElem | ( | ) | const [inline] |
Definition at line 47 of file DifArray.h.
References _nElem.
Referenced by copy(), fetch(), jacobian(), operator()(), operator[](), print(), and zero().
00047 {return _nElem;} // number of elements
DifNumber & DifArray::operator() | ( | int | i | ) |
Definition at line 67 of file DifArray.cxx.
References copy().
00067 { 00068 copy(rhs); 00069 return *this; 00070 }
DifNumber & DifArray::operator[] | ( | int | i | ) |
void DifArray::print | ( | ) | const |
Definition at line 104 of file DifArray.cxx.
References genRecEmupikp::i, and nElem().
00104 { 00105 cout << "nElem=" << nElem() << endl; 00106 for(int i=1; i<=nElem(); i++){ 00107 //SKIP cout << "element(" << i << ")=" << _pointer[i-1]; 00108 } 00109 00110 }
void DifArray::zero | ( | int | npar = 0 |
) |
Definition at line 97 of file DifArray.cxx.
References _pointer, genRecEmupikp::i, nElem(), and DifNumber::setNPar().
Referenced by DifArray().
00097 { 00098 for(int i=0; i<nElem(); i++) { 00099 _pointer[i]=0.0; 00100 _pointer[i].setNPar(npar); 00101 } 00102 }
int DifArray::_nElem [private] |
DifNumber* DifArray::_pointer [private] |
Definition at line 57 of file DifArray.h.
Referenced by copy(), fetch(), jacobian(), operator()(), operator[](), zero(), and ~DifArray().