Stan Math Library  2.15.0
reverse mode automatic differentiation
lkj_corr_rng.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_RNG_HPP
2 #define STAN_MATH_PRIM_MAT_PROB_LKJ_CORR_RNG_HPP
3 
7 
8 namespace stan {
9  namespace math {
10 
24  template <class RNG>
25  inline
26  Eigen::MatrixXd lkj_corr_rng(size_t K, double eta, RNG& rng) {
27  static const char* function("lkj_corr_rng");
28  check_positive(function, "Shape parameter", eta);
30  rng));
31  }
32 
33  }
34 }
35 #endif
Eigen::Matrix< fvar< T >, R, R > multiply_lower_tri_self_transpose(const Eigen::Matrix< fvar< T >, R, C > &m)
Eigen::MatrixXd lkj_corr_rng(size_t K, double eta, RNG &rng)
Return a random correlation matrix (symmetric, positive definite, unit diagonal) of the specified dim...
Eigen::MatrixXd lkj_corr_cholesky_rng(size_t K, double eta, RNG &rng)
void check_positive(const char *function, const char *name, const T_y &y)
Check if y is positive.

     [ Stan Home Page ] © 2011–2016, Stan Development Team.