public final class Beta extends Object
\[ 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>
.
Modifier and Type | Method and Description |
---|---|
static double |
value(double a,
double b)
Computes the value of the
beta function B(a, b).
|
public static double value(double a, double b)
\[ B(a, b) = \frac{\Gamma(a)\ \Gamma(b)}{\Gamma(a+b)} \]
where \( \Gamma(z) \) is the gamma function.
a
- Parameter a
.b
- Parameter b
.Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.