template<typename T_N , typename T_shape1 , typename T_shape2 , class RNG >
VectorBuilder< true, int, T_N, T_shape1, T_shape2 >::type stan::math::beta_binomial_rng |
( |
const T_N & |
N, |
|
|
const T_shape1 & |
alpha, |
|
|
const T_shape2 & |
beta, |
|
|
RNG & |
rng |
|
) |
| |
|
inline |
Return a beta-binomial random variate with the specified population size, success, and failure parameters using the given random number generator.
N, alpha, and beta can each be a scalar or a one-dimensional container. Any non-scalar inputs must be the same size.
- Template Parameters
-
T_N | Type of population size parameter |
T_shape1 | Type of success parameter |
T_shape2 | Type of failure parameter |
RNG | type of random number generator |
- Parameters
-
N | (Sequence of) population size parameter(s) |
alpha | (Sequence of) positive success parameter(s) |
beta | (Sequence of) positive failure parameter(s) |
rng | random number generator |
- Returns
- (Sequence of) beta-binomial random variate(s)
- Exceptions
-
std::domain_error | if N is negative, or alpha or beta are nonpositive |
std::invalid_argument | if non-scalar arguments are of different sizes |
Definition at line 33 of file beta_binomial_rng.hpp.