vec_math
Class Gamma

java.lang.Object
  extended by vec_math.Gamma

public class Gamma
extends Object

Class containing statically versions of the gamma and incomplete gamma function. Lit: Num.Rec. p206ff.


Nested Class Summary
static class Gamma.Erf
          Error function.
static class Gamma.InverseErf
          Inverse of error function: determine the argument, where erf(x) = the given vaule.
 
Field Summary
protected static double EPS
           
protected static double FPMIN
           
static double[] GAMCOEF
           
protected static int ITERMAX
           
static double SER
           
static double STP
           
 
Constructor Summary
Gamma()
           
 
Method Summary
static double betai(double a, double b, double x)
           
private static double contFrac(double a, double b, double x)
           
static double erf(double x)
           
static double erfc(double x)
           
protected static double gammcf(double a, double x)
          Does not check right range on a,x; returns 1-P(a,x)
static double gammln(double x)
          Calculates the ln of Gamma(x) if x>0.
static double gammp(double a, double x)
           
static double gammq(double a, double x)
          Returns the incomplete gamma functon 1-P(a,x).
protected static double gamser(double a, double x)
          Does not check for right range in a,x; returns P(a,x)
static void main(String[] arg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GAMCOEF

public static final double[] GAMCOEF

STP

public static final double STP
See Also:
Constant Field Values

SER

public static final double SER
See Also:
Constant Field Values

ITERMAX

protected static final int ITERMAX
See Also:
Constant Field Values

EPS

protected static final double EPS
See Also:
Constant Field Values

FPMIN

protected static final double FPMIN
See Also:
Constant Field Values
Constructor Detail

Gamma

public Gamma()
Method Detail

gammln

public static double gammln(double x)
Calculates the ln of Gamma(x) if x>0.

Parameters:
x -
Returns:
double

gammq

public static double gammq(double a,
                           double x)
Returns the incomplete gamma functon 1-P(a,x).

Parameters:
a -
x -
Returns:
double

gammp

public static double gammp(double a,
                           double x)

erf

public static double erf(double x)

erfc

public static double erfc(double x)

betai

public static double betai(double a,
                           double b,
                           double x)

contFrac

private static final double contFrac(double a,
                                     double b,
                                     double x)

gamser

protected static double gamser(double a,
                               double x)
Does not check for right range in a,x; returns P(a,x)

Parameters:
a -
x -
Returns:
double

gammcf

protected static double gammcf(double a,
                               double x)
Does not check right range on a,x; returns 1-P(a,x)

Parameters:
a -
x -
Returns:
double

main

public static void main(String[] arg)
Parameters:
arg -