Package jebl.math

# Class GammaFunction

java.lang.Object
jebl.math.GammaFunction

public class GammaFunction extends Object
gamma function

Version:
  $Id: GammaFunction.java 305 2006-04-26 00:22:30Z rambaut $
Author:
  Korbinian Strimmer

## Constructor Summary

Constructors
Constructor
Description
`GammaFunction()`

## Method Summary

Modifier and Type
Method
Description
`static double`
`incompleteGammaP(double a, double x)`
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
`static double`
`incompleteGammaP(double a, double x, double lnGammaA)`
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
`static double`
`incompleteGammaQ(double a, double x)`
Incomplete Gamma function Q(a,x) (a cleanroom implementation of Numerical Recipes gammq(a,x); in Mathematica this function is called GammaRegularized)
`static double`
`lnGamma(double alpha)`
log Gamma function: ln(gamma(alpha)) for alpha>0, accurate to 10 decimal places

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### GammaFunction

public GammaFunction()

## Method Details

### lnGamma

public static double lnGamma(double alpha)
log Gamma function: ln(gamma(alpha)) for alpha>0, accurate to 10 decimal places

Parameters:
  `alpha` - argument

### incompleteGammaQ

public static double incompleteGammaQ(double a, double x)
Incomplete Gamma function Q(a,x) (a cleanroom implementation of Numerical Recipes gammq(a,x); in Mathematica this function is called GammaRegularized)

Parameters:
  `a` - parameter
  `x` - argument
Returns:
  function value

### incompleteGammaP

public static double incompleteGammaP(double a, double x)
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)

Parameters:
  `a` - parameter
  `x` - argument
Returns:
  function value

### incompleteGammaP

public static double incompleteGammaP(double a, double x, double lnGammaA)
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)

Parameters:
  `a` - parameter
  `x` - argument
  `lnGammaA` - precomputed lnGamma(a)
Returns:
  function value