From 173323e3502c0c5cb9384ad63e55184ea22dc58d Mon Sep 17 00:00:00 2001
From: Ben Webb <ben@salilab.org>
Date: Wed, 20 Nov 2019 09:39:16 -0800
Subject: [PATCH] Use Boost log gamma implementation

Replace use of std::lgamma with boost::math::lgamma.
The former needs C++11.
---
 src/GaussianEMRestraint.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/GaussianEMRestraint.cpp b/src/GaussianEMRestraint.cpp
index a1e973b..b79788c 100755
--- a/src/GaussianEMRestraint.cpp
+++ b/src/GaussianEMRestraint.cpp
@@ -15,6 +15,7 @@
 #include <IMP/isd/isd_config.h>
 #include <IMP/isd/Scale.h>
 #include <IMP/isd/em_utilities.h>
+#include <boost/math/special_functions/gamma.hpp>
 
 IMPBAYESIANEM_BEGIN_NAMESPACE
 
@@ -98,7 +99,7 @@ void GaussianEMRestraint::compute_initial_scores() {
   }
   cached_score_term_ += (3.0 + dsize_) / 2.0 * std::log(2);
   cached_score_term_ += 0.5 * std::log(IMP::PI);
-  cached_score_term_ -= std::lgamma(dsize_ / 2.0);
+  cached_score_term_ -= boost::math::lgamma(dsize_ / 2.0);
 
   // precalculate the self-mm score and initialize
   for (int i = 0; i < msize_; i++) {
-- 
GitLab