summaryrefslogtreecommitdiff
path: root/utils
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
commit4845fbb1288c92ce73f84d3c7878b7c81dc09654 (patch)
tree5202ee5e0699c3178a7c0288d79419c44a964e9f /utils
parentdbe064a15aa78b344d13db5bd831cc9e0a9bbac1 (diff)
boost version checking, check for Eigen, get rid of old digamma stuff
Diffstat (limited to 'utils')
-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;