Stan Math Library  2.15.0
reverse mode automatic differentiation
dirichlet_log.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_PROB_DIRICHLET_LOG_HPP
2 #define STAN_MATH_PRIM_MAT_PROB_DIRICHLET_LOG_HPP
3 
5 #include <boost/math/tools/promotion.hpp>
7 
8 namespace stan {
9  namespace math {
10 
30  template <bool propto,
31  typename T_prob, typename T_prior_sample_size>
32  typename boost::math::tools::promote_args<T_prob, T_prior_sample_size>::type
33  dirichlet_log(const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta,
34  const Eigen::Matrix<T_prior_sample_size, Eigen::Dynamic, 1>&
35  alpha) {
36  return dirichlet_lpmf<propto, T_prob, T_prior_sample_size>(theta, alpha);
37  }
38 
42  template <typename T_prob, typename T_prior_sample_size>
43  inline
44  typename boost::math::tools::promote_args<T_prob, T_prior_sample_size>::type
45  dirichlet_log(const Eigen::Matrix<T_prob, Eigen::Dynamic, 1>& theta,
46  const Eigen::Matrix<T_prior_sample_size, Eigen::Dynamic, 1>&
47  alpha) {
48  return dirichlet_lpmf<T_prob, T_prior_sample_size>(theta, alpha);
49  }
50 
51  }
52 }
53 #endif
boost::math::tools::promote_args< T_prob, T_prior_sample_size >::type dirichlet_log(const Eigen::Matrix< T_prob, Eigen::Dynamic, 1 > &theta, const Eigen::Matrix< T_prior_sample_size, Eigen::Dynamic, 1 > &alpha)
The log of the Dirichlet density for the given theta and a vector of prior sample sizes...

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