Class InternalGamma

java.lang.Object
org.apache.commons.rng.sampling.distribution.InternalGamma

final class InternalGamma extends Object

Adapted and stripped down copy of class "org.apache.commons.math4.special.Gamma".

This is a utility class that provides computation methods related to the Γ (Gamma) family of functions.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final double
    Avoid repeated computation of log(2*PI) / 2 in logGamma.
    private static final double[]
    Lanczos coefficients.
    (package private) static final double
    Constant \( g = \frac{607}{128} \) in the Lanczos approximation.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Class contains only static methods.
  • Method Summary

    Modifier and Type
    Method
    Description
    private static double
    lanczos(double x)
    Computes the Lanczos approximation used to compute the gamma function.
    (package private) static double
    logGamma(double x)
    Computes the function \( \ln \Gamma(x) \) for \( x \geq 8 \).

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LANCZOS_G

      static final double LANCZOS_G
      Constant \( g = \frac{607}{128} \) in the Lanczos approximation.
      See Also:
    • LANCZOS_COEFFICIENTS

      private static final double[] LANCZOS_COEFFICIENTS
      Lanczos coefficients.
    • HALF_LOG_2_PI

      private static final double HALF_LOG_2_PI
      Avoid repeated computation of log(2*PI) / 2 in logGamma.
      See Also:
  • Constructor Details

    • InternalGamma

      private InternalGamma()
      Class contains only static methods.
  • Method Details