MyGamma Class Reference

#include <Gamma.hh>


Public Member Functions

 MyGamma ()
 ~MyGamma ()
double Gamma (double z)
double Gamma (double a, double x)


Detailed Description

Definition at line 46 of file Gamma.hh.


Constructor & Destructor Documentation

MyGamma::MyGamma (  ) 

Definition at line 37 of file Gamma.cc.

00037 {}

MyGamma::~MyGamma (  ) 

Definition at line 39 of file Gamma.cc.

00039 {}


Member Function Documentation

double MyGamma::Gamma ( double  a,
double  x 
)

Definition at line 60 of file Gamma.cc.

00061 {
00062   // Computation of the incomplete gamma function P(a,x)
00063   //
00064   // The algorithm is based on the formulas and code as denoted in
00065   // Numerical Recipes 2nd ed. on p. 210-212 (W.H.Press et al.).
00066   //
00067   //--- Nve 14-nov-1998 UU-SAP Utrecht
00068   
00069   if (a <= 0 || x <= 0) return 0;
00070   
00071   if (x < (a+1)) return GamSer(a,x);
00072   else           return GamCf(a,x);
00073 }

double MyGamma::Gamma ( double  z  ) 

Definition at line 42 of file Gamma.cc.

Referenced by GVFlashShowerParameterisation::gam().

00043 {
00044   // Computation of gamma(z) for all z>0.
00045   //
00046   // The algorithm is based on the article by C.Lanczos [1] as denoted in
00047   // Numerical Recipes 2nd ed. on p. 207 (W.H.Press et al.).
00048   //
00049   // [1] C.Lanczos, SIAM Journal of Numerical Analysis B1 (1964), 86.
00050   //
00051   //--- Nve 14-nov-1998 UU-SAP Utrecht
00052   
00053   if (z<=0) return 0;
00054   
00055   double v = LnGamma(z);
00056   return std::exp(v);
00057 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:54:03 2013 for Geant4 by  doxygen 1.4.7