1 #ifndef STAN_MATH_PRIM_MAT_PROB_WISHART_RNG_HPP
2 #define STAN_MATH_PRIM_MAT_PROB_WISHART_RNG_HPP
28 inline Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
30 const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>& S,
32 using Eigen::MatrixXd;
38 static const char*
function(
"stan::math::wishart_rng");
45 MatrixXd B = MatrixXd::Zero(k, k);
47 for (
int j = 0; j < k; ++j) {
48 for (
int i = 0; i < j; ++i)
double chi_square_rng(const double nu, RNG &rng)
fvar< T > sqrt(const fvar< T > &x)
Primary template class for the metaprogram to compute the index type of a container.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > wishart_rng(const double nu, const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &S, RNG &rng)
Eigen::Matrix< fvar< T >, C, C > crossprod(const Eigen::Matrix< fvar< T >, R, C > &m)
bool check_positive(const char *function, const char *name, const T_y &y)
Return true if y is positive.
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
double normal_rng(const double mu, const double sigma, RNG &rng)