Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ discrete_range_rng()

template<typename T_lower , typename T_upper , class RNG >
VectorBuilder< true, int, T_lower, T_upper >::type stan::math::discrete_range_rng ( const T_lower &  lower,
const T_upper &  upper,
RNG &  rng 
)
inline

Return an integer random variate between the given lower and upper bounds (inclusive) using the specified random number generator.

lower and upper can each be a scalar or a one-dimensional container. Any non-scalar inputs must be the same size.

Template Parameters
T_lowertype of lower bound, either int or std::vector<int>
T_uppertype of upper bound, either int or std::vector<int>
RNGtype of random number generator
Parameters
lowerlower bound
upperupper bound
rngrandom number generator
Returns
A (sequence of) integer random variate(s) between lower and upper, both bounds included.
Exceptions
std::domain_errorif upper is smaller than lower.
std::invalid_argumentif non-scalar arguments are of different sizes.

Definition at line 36 of file discrete_range_rng.hpp.