1 #ifndef STAN_MATH_PRIM_MAT_PROB_WISHART_RNG_HPP 2 #define STAN_MATH_PRIM_MAT_PROB_WISHART_RNG_HPP 16 inline Eigen::MatrixXd
18 static const char*
function(
"wishart_rng");
20 using Eigen::MatrixXd;
24 check_greater(
function,
"degrees of freedom > dims - 1", nu, k - 1);
26 MatrixXd B = MatrixXd::Zero(k, k);
27 for (
int j = 0; j < k; ++j) {
28 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)
double normal_rng(double mu, double sigma, RNG &rng)
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_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Check if the specified matrix is square.
double chi_square_rng(double nu, RNG &rng)
Return a pseudorandom chi squared variate with the nu degrees of freedom using the specified random n...
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.