Stan Math Library
5.0.0
Automatic Differentiation
|
|
inline |
Return a von Mises random variate for the given location and concentration using the specified random number generator.
mu and kappa can each be a scalar or a vector. Any non-scalar inputs must be the same length.
The algorithm used in von_mises_rng is a modified version of the algorithm in:
Efficient Simulation of the von Mises Distribution D. J. Best and N. I. Fisher Journal of the Royal Statistical Society. Series C (Applied Statistics), Vol. 28, No. 2 (1979), pp. 152-157
For kappa < 1.4e-8, this reduces to a uniform distribution.
T_loc | type of location parameter |
T_conc | type of scale (concentration) parameter |
RNG | type of random number generator |
mu | (Sequence of) location parameter(s) |
kappa | (Sequence of) non-negative scale (concentration) parameter(s) |
rng | random number generator |
std::domain_error | if mu is infinite or kappa is negative |
std::invalid_argument | if non-scalar arguments are of different sizes |
Definition at line 46 of file von_mises_rng.hpp.