Woolz Image Processing  Version 1.7.5
AlgGamma

Files

file  AlgGamma.c
 Functions for computing gamma and incomplete gamma functions.
 

Functions

double AlgGammaLog (double x, AlgError *dstErr)
 Computes the log gamma function log(Gamma(x)), ie exp(AlgGammaLog(n + 1)) = n!. This function is based on the function gammln(): Press W. H., Teukolsky S. A., Vetterling W. T. and Flannery B. P, Numerical Recipies in C, 1992, CUP. More...
 
double AlgGammaP (double a, double x, AlgError *dstErr)
 Computes the incomplete gamma function P(a,x), which has the limiting values P(a,0) = 0, P(a, oo) = 1.. This function is based on the function gammp(): Press W. H., Teukolsky S. A., Vetterling W. T. and Flannery B. P, Numerical Recipies in C, 1992, CUP. More...
 

Detailed Description

Function Documentation

double AlgGammaLog ( double  x,
AlgError dstErr 
)

Computes the log gamma function log(Gamma(x)), ie exp(AlgGammaLog(n + 1)) = n!. This function is based on the function gammln(): Press W. H., Teukolsky S. A., Vetterling W. T. and Flannery B. P, Numerical Recipies in C, 1992, CUP.

Returns
Log of gamma function value.
Parameters
xGiven value.
dstErrDestination ptr for error code, may be NULL.

References ALG_ERR_FUNC, and ALG_ERR_NONE.

Referenced by AlgGammaP().

double AlgGammaP ( double  a,
double  x,
AlgError dstErr 
)

Computes the incomplete gamma function P(a,x), which has the limiting values P(a,0) = 0, P(a, oo) = 1.. This function is based on the function gammp(): Press W. H., Teukolsky S. A., Vetterling W. T. and Flannery B. P, Numerical Recipies in C, 1992, CUP.

Returns
Incomplete gamma function value.
Parameters
aIncomplete gamma fn parameter.
xIncomplete gamma fn parameter.
dstErrDestination ptr for error code, may be NULL.

References ALG_ERR_CONVERGENCE, ALG_ERR_FUNC, ALG_ERR_NONE, and AlgGammaLog().

Referenced by AlgLinearFit1D(), and AlgLinearFitIdx1D().