diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/m.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3,6 +3,7 @@ #include <cassert> #include <cmath> +#include <boost/math/special_functions/digamma.hpp> template <typename F> struct M { @@ -81,6 +82,11 @@ struct M { } } + // digamma is the first derivative of the log-gamma function + static inline F digamma(const F& x) { + return boost::math::digamma(x); + } + }; typedef M<double> Md; |