|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.math.Gamma
public class Gamma
This class calculates the incomplete gamma function and complementary incomplete gamma function. This is a Java translation of Algorithm 542: Incomplete Gamma Functions [S14] by W. Gautschi from ACM Transactions on Mathematical Software (TOMS) Volume 5 , Issue 4 (December 1979) Pages: 482 - 489 see http://www.netlib.org/toms/542 The original algorithm was "taylored to the accuracy requirements of the CDC 6500 computer." Little to no attempt has been made to re-optimize for Java, other than to use Double.{MAX,MIN}_VALUE in place of defined constants.
| Field Summary | |
|---|---|
protected static double |
AL10
|
protected static double |
ALPREC
|
protected static double |
BOT
|
protected static int |
BOTEXP
|
protected static double[] |
C
|
protected static double[] |
DBDEN
|
protected static double[] |
DBNUM
|
protected static double |
DC
|
protected double |
G
|
protected double |
GSTAR
|
protected int |
IFLGST
|
protected static float |
PREC
|
protected static double |
TOP
|
protected static int |
TOPEXP
|
| Constructor Summary | |
|---|---|
Gamma()
|
|
| Method Summary | |
|---|---|
protected void |
calcBoth(double A,
double X)
|
double |
calcGamma(double a,
double x)
Return the normalized complementary incomplete gamma function, (integral from t=x to t=inf of exp(-t)*t^(a-1)) / gamma(a) if a>0 or (integral from t=x to t=inf of exp(-t)*t^(a-1)) * exp(x)*x^(-a) if a<=0 |
double |
calcGammaStar(double a,
double x)
Return the normalized incomplete gamma function, (integral from t=0 to t=x of exp(-t)*t^(a-1)) / x^a if a>0 If a=0 and x=0, gammaStar is indeterminate and an exception is thrown. |
protected static double |
DLGA(double DX)
|
double |
getLastGamma()
Return the normalized complementary incomplete gamma function from the last calculation. |
double |
getLastGammaStar()
Return the normalized incomplete gamma function from the last calculation. |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final float PREC
protected static final int TOPEXP
protected static final int BOTEXP
protected static final double AL10
protected static final double ALPREC
protected static final double TOP
protected static final double BOT
protected static final double[] C
protected double G
protected double GSTAR
protected int IFLGST
protected static final double[] DBNUM
protected static final double[] DBDEN
protected static final double DC
| Constructor Detail |
|---|
public Gamma()
| Method Detail |
|---|
public double calcGamma(double a,
double x)
public double calcGammaStar(double a,
double x)
public double getLastGamma()
public double getLastGammaStar()
protected void calcBoth(double A,
double X)
protected static double DLGA(double DX)
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||