Stan Math Library  2.15.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 
6 #include <boost/math/tools/promotion.hpp>
7 #include <vector>
8 
9 namespace stan {
10  namespace math {
11 
15  template <bool propto,
16  typename T_prob>
17  typename boost::math::tools::promote_args<T_prob>::type
18  multinomial_log(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
28  multinomial_log(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  }
34 }
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–2016, Stan Development Team.