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

CLHEP/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
Parameter.hh
Genfun::AbsFunction
Definition: CLHEP/GenericFunctions/AbsFunction.hh:48
AbsFunction.hh
Genfun::IncompleteGamma
Definition: CLHEP/GenericFunctions/IncompleteGamma.hh:20
Genfun::LogGamma
Definition: CLHEP/GenericFunctions/LogGamma.hh:19
Genfun::IncompleteGamma::IncompleteGamma
IncompleteGamma()
Definition: IncompleteGamma.cc:17
Genfun::Argument
Definition: CLHEP/GenericFunctions/Argument.hh:17
Genfun::IncompleteGamma::operator()
virtual double operator()(double argument) const
Definition: IncompleteGamma.cc:28
Genfun::IncompleteGamma::a
Parameter & a()
Definition: IncompleteGamma.cc:38
Genfun::IncompleteGamma::~IncompleteGamma
virtual ~IncompleteGamma()
Definition: IncompleteGamma.cc:25
Genfun::Parameter
Definition: CLHEP/GenericFunctions/Parameter.hh:35
x
any side effects of that construction would occur twice The semantics of throw x
Definition: whyZMthrowRethrows.txt:37
FUNCTION_OBJECT_DEF
#define FUNCTION_OBJECT_DEF(classname)
Definition: CLHEP/GenericFunctions/AbsFunction.hh:144
LogGamma.hh
Genfun
Definition: CLHEP/GenericFunctions/Abs.hh:14