SciLib.Math
Class SpecFunc

java.lang.Object
  extended by SciLib.Math.SpecFunc

public final class SpecFunc
extends java.lang.Object

This class contains some methods to construct numerical data.


Constructor Summary
SpecFunc()
           
 
Method Summary
static double Bess0(double x, int n)
          The modified zeroth Bessl function
static double beta(double z, double w)
          Compute the beta function at point z, w
static double betainc(double a, double b, double x)
          Compute the incomplete beta function betainc(a,b,x) betainc(a,b,x) = 1/beta(a,b) * integral from 0 to x of t^(a-1)(1-t)^(b-1) dt
static double bico(int n, int k)
          Compute the binomial coefficient
static double diric(double x, int n)
          Compute Dirichlet(x,n)
static double erf(double x)
          Compute the error function erf(x) erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2)dt
static double erfc(double x)
          Compute the error function erfc(x) erfx(x) = 2/sqrt(pi) * integral from x to inf of exp(-t^2)dt
static double expi(double x)
          Compute the exponent integral function expi(n,x) = integral from -inf to x of exp(t)/t dt
static double expint(int n, double x)
          Compute the exponent integral function expint(n,x) = integral from 1 to inf of exp(-x*t)/t^n dt
static double factln(int n)
          Compute the logarithm of n!
static double gamma(double x)
          Compute the logarithm of the gamma function at a point x gamma(x) = integral from 0 to inf of t^(x-1)exp(-t)dt
static double gammaln(double x)
          Compute the logarithm of the gamma function at a point x gamma(x) = integral from 0 to inf of t^(x-1)exp(-t)dt
static double gammap(double a, double x)
          Compute the gamma incomplete function P(a,x) gammap(a,x) = 1/gamma(a) * integral from 0 to x of t^(a-1)exp(-t)dt
static double gammaq(double a, double x)
          Compute the gamma incomplete function Q(a,x) = 1 - P(a,x)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecFunc

public SpecFunc()
Method Detail

gamma

public static double gamma(double x)
Compute the logarithm of the gamma function at a point x gamma(x) = integral from 0 to inf of t^(x-1)exp(-t)dt

Parameters:
x - A double value. If x is an integer n gamma(n + 1) = n!
Returns:
A double value

gammaln

public static double gammaln(double x)
Compute the logarithm of the gamma function at a point x gamma(x) = integral from 0 to inf of t^(x-1)exp(-t)dt

Parameters:
x - A double value. If x is an integer n gamma(n + 1) = n!
Returns:
A double value

factln

public static double factln(int n)
Compute the logarithm of n!

Parameters:
n - An integer value
Returns:
A double value

bico

public static double bico(int n,
                          int k)
Compute the binomial coefficient

Parameters:
n - An integer value, n > 0.
k - An integer value, 0<= k <= n.
Returns:
An integer value, n!/k!(n-k)!

gammap

public static double gammap(double a,
                            double x)
Compute the gamma incomplete function P(a,x) gammap(a,x) = 1/gamma(a) * integral from 0 to x of t^(a-1)exp(-t)dt

Parameters:
a - A double value, a > 0.
x - A double value, x >= 0.
Returns:
A double value.

gammaq

public static double gammaq(double a,
                            double x)
Compute the gamma incomplete function Q(a,x) = 1 - P(a,x)

Parameters:
a - A double value, a > 0.
x - A double value, x >= 0.
Returns:
A double value.

erf

public static double erf(double x)
Compute the error function erf(x) erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2)dt

Parameters:
x - A double value, x >= 0.
Returns:
A double value.

erfc

public static double erfc(double x)
Compute the error function erfc(x) erfx(x) = 2/sqrt(pi) * integral from x to inf of exp(-t^2)dt

Parameters:
x - A double value, x >= 0.
Returns:
A double value.

beta

public static double beta(double z,
                          double w)
Compute the beta function at point z, w

Parameters:
z - A double value.
w - A double value.
Returns:
A double value.

betainc

public static double betainc(double a,
                             double b,
                             double x)
Compute the incomplete beta function betainc(a,b,x) betainc(a,b,x) = 1/beta(a,b) * integral from 0 to x of t^(a-1)(1-t)^(b-1) dt

Parameters:
a - A double value, a > 0.
b - A double value, b > 0.
x - A double value, 0 <= x <= 1.
Returns:
A double value.

expint

public static double expint(int n,
                            double x)
Compute the exponent integral function expint(n,x) = integral from 1 to inf of exp(-x*t)/t^n dt

Parameters:
n - An integer value, n >= 0.
x - A double value, x > 0.
Returns:
A double value.

expi

public static double expi(double x)
Compute the exponent integral function expi(n,x) = integral from -inf to x of exp(t)/t dt

Parameters:
x - A double value, x > 0.
Returns:
A double value.

diric

public static double diric(double x,
                           int n)
Compute Dirichlet(x,n)

Parameters:
x - A double value
n - An integer
Returns:
A double value

Bess0

public static double Bess0(double x,
                           int n)
The modified zeroth Bessl function

Parameters:
x - A double value
n - An integer
Returns:
A double value