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
-
Mu | The mean matrix. |
Sigma | The mxm inverse covariance matrix (i.e., the precision matrix) of the rows of y. |
D | The nxn inverse covariance matrix (i.e., the precision matrix) of the columns of y. |
rng | Pseudo-random number generator. |
- Returns
- A sample from the distribution, of type Matrix<double, Dynamic, Dynamic>.
- Exceptions
-
std::invalid_argument | if Sigma or D are not square. |
std::domain_error | if Sigma or D are not symmetric, not semi-positive definite, or if they contain infinities or NaNs. |
- Template Parameters
-
RNG | Type of pseudo-random number generator. |
Definition at line 32 of file matrix_normal_prec_rng.hpp.