Automatic Differentiation
 
Loading...
Searching...
No Matches
digamma.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_DIGAMMA_HPP
2#define STAN_MATH_PRIM_FUN_DIGAMMA_HPP
3
7#include <boost/math/special_functions/digamma.hpp>
8
9namespace stan {
10namespace math {
11
47inline double digamma(double x) {
48 return boost::math::digamma(x, boost_policy_t<>());
49}
50
60 template <typename T>
61 static inline auto fun(const T& x) {
62 return digamma(x);
63 }
64};
65
74template <typename T,
77inline auto digamma(const T& x) {
79}
80
81} // namespace math
82} // namespace stan
83
84#endif
require_not_t< is_nonscalar_prim_or_rev_kernel_expression< std::decay_t< T > > > require_not_nonscalar_prim_or_rev_kernel_expression_t
Require type does not satisfy is_nonscalar_prim_or_rev_kernel_expression.
require_not_t< is_var_matrix< std::decay_t< T > > > require_not_var_matrix_t
Require type does not satisfy is_var_matrix.
boost::math::policies::policy< boost::math::policies::overflow_error< boost::math::policies::errno_on_error >, boost::math::policies::pole_error< boost::math::policies::errno_on_error >, boost::math::policies::promote_double< false >, boost::math::policies::digits2< B > > boost_policy_t
Boost policy that overrides the defaults to match the built-in C++ standard library functions.
fvar< T > digamma(const fvar< T > &x)
Return the derivative of the log gamma function at the specified argument.
Definition digamma.hpp:23
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9
Base template class for vectorization of unary scalar functions defined by a template class F to a sc...
static auto fun(const T &x)
Definition digamma.hpp:61
Structure to wrap digamma() so it can be vectorized.
Definition digamma.hpp:59