Stan Math Library  2.15.0
reverse mode automatic differentiation
categorical_log.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_CATEGORICAL_LOG_HPP
2 #define STAN_MATH_PRIM_MAT_PROB_CATEGORICAL_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, typename T_prob>
16  typename boost::math::tools::promote_args<T_prob>::type
18  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
19  return categorical_lpmf<propto, T_prob>(n, theta);
20  }
21 
25  template <typename T_prob>
26  typename boost::math::tools::promote_args<T_prob>::type
28  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
29  return categorical_lpmf<T_prob>(n, theta);
30  }
31 
35  template <bool propto, typename T_prob>
36  typename boost::math::tools::promote_args<T_prob>::type
37  categorical_log(const std::vector<int>& ns,
38  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
39  return categorical_lpmf<propto, T_prob>(ns, theta);
40  }
41 
45  template <typename T_prob>
46  inline
47  typename boost::math::tools::promote_args<T_prob>::type
48  categorical_log(const std::vector<int>& ns,
49  const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta) {
50  return categorical_lpmf<false>(ns, theta);
51  }
52 
53  }
54 }
55 #endif
Primary template class for the metaprogram to compute the index type of a container.
Definition: index_type.hpp:18
boost::math::tools::promote_args< T_prob >::type categorical_log(int n, const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta)

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