numRecipes
Class SpecialFunctions

java.lang.Object
  extended by numRecipes.SpecialFunctions
All Implemented Interfaces:
Function

public class SpecialFunctions
extends java.lang.Object
implements Function

Utilities for Spectial Functions. Some of them are based on the Numerical Recipes Library


Constructor Summary
SpecialFunctions()
           
 
Method Summary
static double alogGamma(double xx)
          log(Gamma(a)) function
static double binominal(double mu, long n, long m)
          Binominal distribution nCm mu^m(1-mu)^(n-m)
static double gammaP(double a, double x)
          P(a x)= gamma(a,x)/Gamma(a) from 0 to x.
static double gammaQ(double a, double x)
          Q(a x)= Gamma(a,x)/Gamma(a) from 0 to x.
static double gauss(double mu, double sigma, double x)
          Gaussian function
 double getFunction(int functionIndex, double[] parameters, double x)
           Method for interface .
static double incompleteGammaDowntoX(double a, double x)
          Gamma(a,x)/Gamma(a) from x to infinity
static double incompleteGammaUptoX(double a, double x)
          gamma(a,x)/Gamma(a) from 0 to x
static double integrateGauss(double mu, double sigma, double lowerBound, double upperBound)
          Integration of the Gaussian function.
static double poisson(double mu, long m)
          Poisson distribution function
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecialFunctions

public SpecialFunctions()
Method Detail

alogGamma

public static double alogGamma(double xx)
log(Gamma(a)) function


incompleteGammaUptoX

public static double incompleteGammaUptoX(double a,
                                          double x)
gamma(a,x)/Gamma(a) from 0 to x


incompleteGammaDowntoX

public static double incompleteGammaDowntoX(double a,
                                            double x)
Gamma(a,x)/Gamma(a) from x to infinity


gammaP

public static double gammaP(double a,
                            double x)
P(a x)= gamma(a,x)/Gamma(a) from 0 to x. Using imcompleteGamma methods described above saves iterations and CPU time.


gammaQ

public static double gammaQ(double a,
                            double x)
Q(a x)= Gamma(a,x)/Gamma(a) from 0 to x. Using imcompleteGamma methods described above saves iterations and CPU time.


gauss

public static double gauss(double mu,
                           double sigma,
                           double x)
Gaussian function


poisson

public static double poisson(double mu,
                             long m)
Poisson distribution function


binominal

public static double binominal(double mu,
                               long n,
                               long m)
Binominal distribution nCm mu^m(1-mu)^(n-m)


getFunction

public double getFunction(int functionIndex,
                          double[] parameters,
                          double x)
        Method for interface  .
        Interface the special functions given here
        to the utility routiner such as the Romberg
        Integration code that is desinged for a genereal
        function in form of Func(x).

        FunctionIndex    1     Gaussian gauss(mu, sigma, double x)
                               parameters[0]=mu
                               parameters[1]=sigma 
       

Specified by:
getFunction in interface Function

integrateGauss

public static double integrateGauss(double mu,
                                    double sigma,
                                    double lowerBound,
                                    double upperBound)
Integration of the Gaussian function. It uses the interface and the class written in Integration.java . Integration blacket [lowerBound upperBound]