Class RegularizedGamma.Q

  • Enclosing class:
    RegularizedGamma

    public static final class RegularizedGamma.Q
    extends java.lang.Object
    Upper regularized Gamma function \( Q(a, x) \).

    \[ Q(a,x) = 1 - P(a,x) = \frac{\Gamma(a,x)}{\Gamma(a)} = \frac{1}{\Gamma(a)} \int_x^{\infty} t^{a-1}\,e^{-t}\,dt \]

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Q()
      Prevent instantiation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double derivative​(double a, double x)
      Computes the derivative of the upper regularized gamma function \( Q(a, x) \).
      static double value​(double a, double x)
      Computes the upper regularized gamma function \( Q(a, x) \).
      static double value​(double a, double x, double epsilon, int maxIterations)
      Computes the upper regularized gamma function \( Q(a, x) \).
      • Methods inherited from class java.lang.Object

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

      • Q

        private Q()
        Prevent instantiation.
    • Method Detail

      • value

        public static double value​(double a,
                                   double x)
        Computes the upper regularized gamma function \( Q(a, x) \).
        Parameters:
        a - Argument.
        x - Argument.
        Returns:
        \( Q(a, x) \).
        Throws:
        java.lang.ArithmeticException - if the series evaluation fails to converge.
      • value

        public static double value​(double a,
                                   double x,
                                   double epsilon,
                                   int maxIterations)
        Computes the upper regularized gamma function \( Q(a, x) \).
        Parameters:
        a - Argument.
        x - Argument.
        epsilon - Tolerance in series evaluation.
        maxIterations - Maximum number of iterations in series evaluation.
        Returns:
        \( Q(a, x) \).
        Throws:
        java.lang.ArithmeticException - if the series evaluation fails to converge.
      • derivative

        public static double derivative​(double a,
                                        double x)
        Computes the derivative of the upper regularized gamma function \( Q(a, x) \).

        \[ \frac{\delta}{\delta x} Q(a,x) = -\frac{e^{-x} x^{a-1}}{\Gamma(a)} \]

        This function has uses in some statistical distributions.

        Parameters:
        a - Argument.
        x - Argument.
        Returns:
        derivative of \( Q(a,x) \) with respect to x.
        Since:
        1.1