1 #ifndef STAN_MATH_PRIM_MAT_PROB_WISHART_RNG_HPP 2 #define STAN_MATH_PRIM_MAT_PROB_WISHART_RNG_HPP 15 inline Eigen::MatrixXd
wishart_rng(
double nu,
const Eigen::MatrixXd& S,
17 static const char*
function =
"wishart_rng";
19 using Eigen::MatrixXd;
23 check_greater(
function,
"degrees of freedom > dims - 1", nu, k - 1);
25 MatrixXd B = MatrixXd::Zero(k, k);
26 for (
int j = 0; j < k; ++j) {
27 for (
int i = 0; i < j; ++i)
Eigen::MatrixXd wishart_rng(double nu, const Eigen::MatrixXd &S, RNG &rng)
fvar< T > sqrt(const fvar< T > &x)
void check_square(const char *function, const char *name, const matrix_cl &y)
Check if the matrix_cl is square.
VectorBuilder< true, double, T_loc, T_scale >::type normal_rng(const T_loc &mu, const T_scale &sigma, RNG &rng)
Return a Normal random variate for the given location and scale using the specified random number gen...
Primary template class for the metaprogram to compute the index type of a container.
Eigen::Matrix< fvar< T >, C, C > crossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
void check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Check if y is strictly greater than low.
VectorBuilder< true, double, T_deg >::type chi_square_rng(const T_deg &nu, RNG &rng)
Return a chi squared random variate with nu degrees of freedom using the specified random number gene...