Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ matrix_normal_prec_rng()

template<class RNG >
Eigen::MatrixXd stan::math::matrix_normal_prec_rng ( const Eigen::MatrixXd &  Mu,
const Eigen::MatrixXd &  Sigma,
const Eigen::MatrixXd &  D,
RNG &  rng 
)
inline

Sample from the the matrix normal distribution for the given Mu, Sigma and D where Sigma and D are given as precision matrices, not covariance matrices.

Parameters
MuThe mean matrix.
SigmaThe mxm inverse covariance matrix (i.e., the precision matrix) of the rows of y.
DThe nxn inverse covariance matrix (i.e., the precision matrix) of the columns of y.
rngPseudo-random number generator.
Returns
A sample from the distribution, of type Matrix<double, Dynamic, Dynamic>.
Exceptions
std::invalid_argumentif Sigma or D are not square.
std::domain_errorif Sigma or D are not symmetric, not semi-positive definite, or if they contain infinities or NaNs.
Template Parameters
RNGType of pseudo-random number generator.

Definition at line 32 of file matrix_normal_prec_rng.hpp.