Go to the source code of this file.
|
template<typename T1 , typename T2 > |
constexpr common_return_t< T1, T2 > | beta (const T1 a, const T2 b) noexcept |
| Compile-time beta function. More...
|
|
◆ beta()
template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > beta |
( |
const T1 |
a, |
|
|
const T2 |
b |
|
) |
| |
|
constexprnoexcept |
Compile-time beta function.
- Parameters
-
a | a real-valued input. |
b | a real-valued input. |
- Returns
- the beta function using
\[ \text{B}(\alpha,\beta) := \int_0^1 t^{\alpha - 1} (1-t)^{\beta - 1} dt = \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha + \beta)} \]
where \( \Gamma \) denotes the gamma function.