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);
38 ns.size(),
"Size of number of trials variable",
39 theta.rows(),
"rows of probabilities parameter",
46 for (
unsigned int i = 0; i < ns.size(); ++i)
49 for (
unsigned int i = 0; i < ns.size(); ++i)
53 for (
unsigned int i = 0; i < ns.size(); ++i)
59 template <
bool propto,
61 typename boost::math::tools::promote_args<T_prob>::type
63 const Eigen::Matrix<T_prob,Eigen::Dynamic,1>& theta) {
67 template <
typename T_prob,
69 typename boost::math::tools::promote_args<T_prob>::type
71 const Eigen::Matrix<T_prob,Eigen::Dynamic,1>& theta,
73 return multinomial_log<false>(ns,theta,Policy());
77 template <
typename T_prob>
78 typename boost::math::tools::promote_args<T_prob>::type
80 const Eigen::Matrix<T_prob,Eigen::Dynamic,1>& theta) {