summaryrefslogtreecommitdiff
path: root/utils/m.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-02-17 13:01:54 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2012-02-17 13:01:54 -0500
commita38b3fa383412e56eb958db998662c026bc08f4b (patch)
treea6054f6f47e885c6ea07fc7c73441a188ec5b400 /utils/m.h
parente8583574e25c8ef09c9cd21cbc7421d9d12cf75f (diff)
boost version checking, check for Eigen, get rid of old digamma stuff
Diffstat (limited to 'utils/m.h')
-rw-r--r--utils/m.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/m.h b/utils/m.h
index b25248c2..5e45efee 100644
--- a/utils/m.h
+++ b/utils/m.h
@@ -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;