Package org.apache.commons.numbers.gamma
Class Beta
java.lang.Object
org.apache.commons.numbers.gamma.Beta
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
value
(double a, double b) Computes the value of the beta function B(a, b).
-
Constructor Details
-
Beta
private Beta()Private constructor.
-
-
Method Details
-
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
- Parametera
.b
- Parameterb
.- Returns:
- the beta function \( B(a, b) \).
-