@@ -95,23 +95,24 @@ inline Eigen::MatrixXd gaussian_dlm_obs_rng(const Eigen::MatrixXd &F,
9595 static const char *function = " gaussian_dlm_obs_rng" ;
9696
9797 int r = F.cols (); // number of variables
98+ int n = G.rows (); // number of states
9899
99- check_size_match (function, " rows of F" , F.rows (), " rows of G" , G. rows () );
100+ check_size_match (function, " rows of F" , F.rows (), " rows of G" , n );
100101 check_finite (function, " F" , F);
101102 check_square (function, " G" , G);
102103 check_finite (function, " G" , G);
103- check_size_match (function, " rows of V" , V.rows (), " cols of F" , F. cols () );
104+ check_size_match (function, " rows of V" , V.rows (), " cols of F" , r );
104105 check_finite (function, " V" , V);
105106 check_positive (function, " V rows" , V.rows ());
106107 check_symmetric (function, " V" , V);
107- check_size_match (function, " rows of W" , W.rows (), " rows of G" , G. rows () );
108+ check_size_match (function, " rows of W" , W.rows (), " rows of G" , n );
108109 check_finite (function, " W" , W);
109110 check_positive (function, " W rows" , W.rows ());
110111 check_symmetric (function, " W" , W);
111- check_size_match (function, " rows of W" , W.rows (), " rows of G" , G. rows () );
112- check_size_match (function, " size of m0" , m0.size (), " rows of G" , G. rows () );
112+ check_size_match (function, " rows of W" , W.rows (), " rows of G" , n );
113+ check_size_match (function, " size of m0" , m0.size (), " rows of G" , n );
113114 check_finite (function, " m0" , m0);
114- check_size_match (function, " rows of C0" , C0.rows (), " rows of G" , G. rows () );
115+ check_size_match (function, " rows of C0" , C0.rows (), " rows of G" , n );
115116 check_finite (function, " C0" , C0);
116117 check_positive (function, " C0 rows" , C0.rows ());
117118 check_symmetric (function, " C0" , C0);
0 commit comments