CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

GenericFunctions/IncompleteGamma.hh
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: IncompleteGamma.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3 //---------------------IncompleteGamma--------------------------------------//
4 // //
5 // Class IncompleteGamma, the incomplete Gamma function //
6 // Joe Boudreau, October 2000 //
7 // //
8 //--------------------------------------------------------------------------//
9 #ifndef IncompleteGamma_h
10 #define IncompleteGamma_h 1
14 namespace Genfun {
15 
20  class IncompleteGamma : public AbsFunction {
21 
23 
24  public:
25 
26  // Constructor
28 
29  // Copy constructor
30  IncompleteGamma(const IncompleteGamma &right);
31 
32  // Destructor
33  virtual ~IncompleteGamma();
34 
35  // Retreive function value
36  virtual double operator ()(double argument) const;
37  virtual double operator ()(const Argument & arg) const {return operator() (arg[0]);}
38 
39  // Get the paramter a
40  Parameter & a();
41 
42  private:
43 
44  // It is illegal to assign an adjustable constant
45  const IncompleteGamma & operator=(const IncompleteGamma &right);
46 
47  // Here is the parameter of the Incomplete Gamma Function
48  Parameter _a;
49 
50  // Compute via series representation:
51  double _gamser(double a, double x, double logGamma) const;
52 
53  // Compute via continued fraction representation:
54  double _gammcf(double a, double x, double logGamma) const;
55 
56  // This function has a LogGamma Function;
57  LogGamma _logGamma;
58 
59  static const int ITMAX;
60  static const double EPS;
61  static const double FPMIN;
62 
63  };
64 } // namespace Genfun
65 #endif
#define FUNCTION_OBJECT_DEF(classname)
virtual double operator()(double argument) const