Class Beta


  • public final class Beta
    extends java.lang.Object
    Beta function.

    \[ B(a, b) = \frac{\Gamma(a)\ \Gamma(b)}{\Gamma(a+b)} = \frac{(a-1)!\ (b-1)!}{(a+b-1)!} \]

    where \( \Gamma(z) \) is the gamma function.

    This code has been adapted from the Boost c++ implementation <boost/math/special_functions/beta.hpp>.

    Since:
    1.1
    See Also:
    Boost C++ Beta function
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Beta()
      Private constructor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double value​(double a, double b)
      Computes the value of the beta function B(a, b).
      • Methods inherited from class java.lang.Object

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

      • Beta

        private Beta()
        Private constructor.
    • Method Detail

      • value

        public static double value​(double a,
                                   double b)
        Computes the value of the beta function B(a, b).

        \[ B(a, b) = \frac{\Gamma(a)\ \Gamma(b)}{\Gamma(a+b)} \]

        where \( \Gamma(z) \) is the gamma function.

        Parameters:
        a - Parameter a.
        b - Parameter b.
        Returns:
        the beta function \( B(a, b) \).