CLHEP
2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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
11
#include "CLHEP/GenericFunctions/AbsFunction.hh"
12
#include "CLHEP/GenericFunctions/Parameter.hh"
13
#include "CLHEP/GenericFunctions/LogGamma.hh"
14
namespace
Genfun
{
15
16
/**
17
* @author
18
* @ingroup genfun
19
*/
20
class
IncompleteGamma
:
public
AbsFunction
{
21
22
FUNCTION_OBJECT_DEF
(
IncompleteGamma
)
23
24
public
:
25
26
// Constructor
27
IncompleteGamma
();
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 override
;
37
virtual
double
operator ()
(
const
Argument
& arg)
const override
{
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
FUNCTION_OBJECT_DEF
#define FUNCTION_OBJECT_DEF(classname)
Definition:
AbsFunction.hh:143
Genfun::AbsFunction
Definition:
AbsFunction.hh:48
Genfun::Argument
Definition:
Argument.hh:17
Genfun::IncompleteGamma
Definition:
IncompleteGamma.hh:20
Genfun::IncompleteGamma::operator()
virtual double operator()(double argument) const override
Definition:
IncompleteGamma.cc:30
Genfun::IncompleteGamma::IncompleteGamma
IncompleteGamma()
Definition:
IncompleteGamma.cc:19
Genfun::IncompleteGamma::~IncompleteGamma
virtual ~IncompleteGamma()
Definition:
IncompleteGamma.cc:27
Genfun::IncompleteGamma::a
Parameter & a()
Definition:
IncompleteGamma.cc:40
Genfun::LogGamma
Definition:
LogGamma.hh:19
Genfun::Parameter
Definition:
Parameter.hh:35
Genfun
Definition:
Abs.hh:14
CLHEP-CLHEP_2_4_6_4
GenericFunctions
GenericFunctions
IncompleteGamma.hh
Generated by
1.9.6