Stan Math Library  2.20.0
reverse mode automatic differentiation
multinomial_log.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_MULTINOMIAL_LOG_HPP
2 #define STAN_MATH_PRIM_MAT_PROB_MULTINOMIAL_LOG_HPP
3 
7 #include <boost/math/tools/promotion.hpp>
8 #include <vector>
9 
10 namespace stan {
11 namespace math {
12 
16 template <bool propto, typename T_prob>
17 typename boost::math::tools::promote_args<T_prob>::type multinomial_log(
18  const std::vector<int>& ns,
19  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
20  return multinomial_lpmf<propto, T_prob>(ns, theta);
21 }
22 
26 template <typename T_prob>
27 typename boost::math::tools::promote_args<T_prob>::type multinomial_log(
28  const std::vector<int>& ns,
29  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
30  return multinomial_lpmf<false>(ns, theta);
31 }
32 
33 } // namespace math
34 } // namespace stan
35 #endif
boost::math::tools::promote_args< T_prob >::type multinomial_log(const std::vector< int > &ns, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)

     [ Stan Home Page ] © 2011–2018, Stan Development Team.