Package pal.math

Class GammaFunction


  • public class GammaFunction
    extends java.lang.Object
    gamma function
    Version:
    $Id: GammaFunction.java,v 1.2 2001/07/13 14:39:13 korbinian Exp $
    Author:
    Korbinian Strimmer
    • Constructor Summary

      Constructors 
      Constructor Description
      GammaFunction()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double incompleteGammaP​(double a, double x)
      Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
      static double incompleteGammaP​(double a, double x, double lnGammaA)
      Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
      static double incompleteGammaQ​(double a, double x)
      Incomplete Gamma function Q(a,x) (a cleanroom implementation of Numerical Recipes gammq(a,x); in Mathematica this function is called GammaRegularized)
      static double lnGamma​(double alpha)
      log Gamma function: ln(gamma(alpha)) for alpha>0, accurate to 10 decimal places
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GammaFunction

        public GammaFunction()
    • Method Detail

      • lnGamma

        public static double lnGamma​(double alpha)
        log Gamma function: ln(gamma(alpha)) for alpha>0, accurate to 10 decimal places
        Parameters:
        alpha - argument
        function - value
      • incompleteGammaQ

        public static double incompleteGammaQ​(double a,
                                              double x)
        Incomplete Gamma function Q(a,x) (a cleanroom implementation of Numerical Recipes gammq(a,x); in Mathematica this function is called GammaRegularized)
        Parameters:
        a - parameter
        x - argument
        Returns:
        function value
      • incompleteGammaP

        public static double incompleteGammaP​(double a,
                                              double x)
        Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
        Parameters:
        a - parameter
        x - argument
        Returns:
        function value
      • incompleteGammaP

        public static double incompleteGammaP​(double a,
                                              double x,
                                              double lnGammaA)
        Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
        Parameters:
        a - parameter
        x - argument
        double - lnGammaA precomputed lnGamma(a)
        Returns:
        function value