1 #ifndef __STAN__PROB__DISTRIBUTIONS__MULTIVARIATE__DISCRETE__MULTINOMIAL_HPP__
2 #define __STAN__PROB__DISTRIBUTIONS__MULTIVARIATE__DISCRETE__MULTINOMIAL_HPP__
17 template <
bool propto,
20 typename boost::math::tools::promote_args<T_prob>::type
22 const Eigen::Matrix<T_prob,Eigen::Dynamic,1>& theta,
24 static const char*
function =
"stan::prob::multinomial_log(%1%)";
29 using boost::math::tools::promote_args;
31 typename promote_args<T_prob>::type lp(0.0);
43 for (
unsigned int i = 0; i < ns.size(); ++i)
46 for (
unsigned int i = 0; i < ns.size(); ++i)
50 for (
unsigned int i = 0; i < ns.size(); ++i)
56 template <
bool propto,
58 typename boost::math::tools::promote_args<T_prob>::type
60 const Eigen::Matrix<T_prob,Eigen::Dynamic,1>& theta) {
64 template <
typename T_prob,
66 typename boost::math::tools::promote_args<T_prob>::type
68 const Eigen::Matrix<T_prob,Eigen::Dynamic,1>& theta,
70 return multinomial_log<false>(ns,theta,Policy());
74 template <
typename T_prob>
75 typename boost::math::tools::promote_args<T_prob>::type
77 const Eigen::Matrix<T_prob,Eigen::Dynamic,1>& theta) {