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

◆ hmm_check()

template<typename T_omega , typename T_Gamma , typename T_rho , require_all_eigen_t< T_omega, T_Gamma > * = nullptr, require_eigen_col_vector_t< T_rho > * = nullptr>
void stan::math::hmm_check ( const T_omega &  log_omegas,
const T_Gamma &  Gamma,
const T_rho &  rho,
const char *  function 
)
inline

Check arguments for hidden Markov model functions with a discrete latent state (lpdf, rng for latent states, and marginal probabilities for latent sates).

Template Parameters
T_omegatype of the log likelihood matrix
T_Gammatype of the transition matrix
T_rhotype of the initial guess vector
Parameters
[in]log_omegaslog matrix of observational densities.
[in]Gammatransition density between hidden states.
[in]rhoinitial state
[in]functionthe name of the function using the arguments.
Exceptions
`std::invalid_argument`if Gamma is not square or if the size of rho is not the number of rows of log_omegas.
`std::domain_error`if rho is not a simplex or the rows of Gamma are not a simplex.

Definition at line 30 of file hmm_check.hpp.