Java Utililty Methods Gamma

List of utility methods to do Gamma

Description

The list of methods to do Gamma are organized into topic(s).

Method

doublegamma(double x)
gamma
double g = 1.0;
double f;
if (x > 0.0) {
    while (x < 3.0) {
        g *= x;
        ++x;
    f = (1.0 - 2.0 / (7.0 * Math.pow(x, 2.0)) * (1.0 - 2.0 / (3.0 * Math.pow(x, 2.0))))
...
doublegamma(double x)
This function computes the gamme function gamma(x)
return Math.exp(logGamma(x));
doublegamma(double x)
gamma
double xcopy = x;
double first = x + lgfGamma + 0.5;
double second = lgfCoeff[0];
double fg = 0.0D;
if (x >= 0.0) {
    if (x >= 1.0D && x - (int) x == 0.0D) {
        fg = factorial((int) x) / x;
    } else {
...
doublegamma(double x)
Returns the Gamma function of a double.
double ans;
double y = Math.abs(x);
if (y <= 10.0) {
    int n = (int) x;
    if (x < 0.0)
        n--;
    y = x - n;
    n--;
...
doubleGamma(double z)
Gamma
double total = 0.0;
double step = (10 * z) / 1000;
double t = 0;
double r = z - 1;
double last = Math.pow(t, r);
for (t = step; t < 10 * z; t += step) {
    double next = Math.pow(t, r) * Exp(-t);
    total += TrapeziumArea(step, last, next);
...
doublegamma(int alpha)
gamma
return factorial(alpha - 1);
intgamma(int rgb)
gamma
return (red(rgb) + green(rgb) + blue(rgb)) / 3;
doublegammaCdf(double a, double x)
compute complementary gamma cdf by its continued fraction expansion
double gln ;
if ((x <= 0.0) || (a <= 0.0)) {
    return Double.NaN;
} else if (a > LARGE_A) {
    return gnorm(a, x);
} else {
    gln = lngamma(a);
    if (x < (a + 1.0)) {
...
doublegammaCdf(double a, double x)
compute complementary gamma cdf by its continued fraction expansion
double gln ;
if ((x <= 0.0) || (a <= 0.0)) {
    return Double.NaN;
} else if (a > LARGE_A) {
    return gnorm(a, x);
} else {
    gln = lngamma(a);
    if (x < (a + 1.0)) {
...
floatgammaCorrection(final float gamma, final float x)
gamma Correction
return (float) Math.pow(x, 1 / gamma);