Automatic Differentiation
 
Loading...
Searching...
No Matches
std_normal_rng.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_PROB_STD_NORMAL_RNG_HPP
2#define STAN_MATH_PRIM_PROB_STD_NORMAL_RNG_HPP
3
5#include <boost/random/normal_distribution.hpp>
6#include <boost/random/variate_generator.hpp>
7
8namespace stan {
9namespace math {
10
19template <class RNG>
20inline double std_normal_rng(RNG& rng) {
21 using boost::normal_distribution;
22 using boost::variate_generator;
23
24 variate_generator<RNG&, normal_distribution<>> norm_rng(
25 rng, normal_distribution<>(0, 1));
26
27 return norm_rng();
28}
29
30} // namespace math
31} // namespace stan
32#endif
double std_normal_rng(RNG &rng)
Return a standard Normal random variate using the specified random number generator.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9