#include <Integrator.h>
Public Member Functions | |
| double | Simpson (const double *f, const int n, const double dx) const |
Static Public Member Functions | |
| Integrator * | Instance (void) |
Private Member Functions | |
| Integrator () | |
| Integrator (const Integrator &intg) | |
| virtual | ~Integrator () |
Static Private Attributes | |
| Integrator * | fInstance = 0 |
________________________________________________________________________________________
Costas Andreopoulos <C.V.Andreopoulos@rl.ac.uk> CCLRC, Rutherford Lab. December 10, 2003 _________________________________________________________________________________________
Definition at line 20 of file Integrator.h.
|
|
Definition at line 28 of file Integrator.cxx. References fInstance. 00029 {
00030 fInstance = 0;
00031 }
|
|
|
Definition at line 33 of file Integrator.cxx. 00033 :
00034 TObject(intg)
00035 {
00036
00037 }
//____________________________________________________________________________
|
|
|
Definition at line 39 of file Integrator.cxx. References fInstance. 00040 {
00041 fInstance = 0;
00042 }
|
|
|
Definition at line 20 of file Integrator.cxx. Referenced by PetrukhinShestakovModel::bbrem(), BezrukovBugaevModel::bnuc(), and KokoulinPetrukhinModel::bpair(). 00021 {
00022 if(fInstance == 0) fInstance = new Integrator();
00023 return fInstance;
00024 }
|
|
||||||||||||||||
|
Definition at line 44 of file Integrator.cxx. Referenced by PetrukhinShestakovModel::bbrem(), BezrukovBugaevModel::bnuc(), and KokoulinPetrukhinModel::bpair(). 00045 {
00046 //-- apply Simpson rule for integration
00047
00048 double integral = (f[0] + f[n-1]) / 2.;
00049
00050 for(int i = 0; i < n-1; i++) integral += ( f[i] * (i%2 + 1) );
00051
00052 integral *= (2.*dx/3.);
00053
00054 return integral;
00055 }
|
|
|
Definition at line 26 of file Integrator.cxx. Referenced by Integrator(), and ~Integrator(). |
1.3.9.1