jebl.math
Class GammaFunction

java.lang.Object
  extended by jebl.math.GammaFunction

public class GammaFunction
extends Object

gamma function

Author:
Korbinian Strimmer

Constructor Summary
GammaFunction()
           
 
Method Summary
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GammaFunction

public GammaFunction()
Method Detail

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