Commit 709320ad authored by Tiago Peixoto's avatar Tiago Peixoto

Fix compilation with Boost 1.62

This fixes issue #347
parent 1ac66242
......@@ -391,7 +391,16 @@ namespace boost {
}
template <typename G, typename EP, typename VP>
inline __attribute__((always_inline))
inline
typename filtered_graph<G, EP, VP>::degree_size_type
degree(typename filtered_graph<G, EP, VP>::vertex_descriptor u,
const filtered_graph<G, EP, VP>& g)
{
return in_degree(u, g) + out_degree(u, g);
}
template <typename G, typename EP, typename VP>
inline __attribute__((always_inline)) __attribute__((flatten))
std::pair<typename filtered_graph<G, EP, VP>::adjacency_iterator,
typename filtered_graph<G, EP, VP>::adjacency_iterator>
out_neighbours(typename filtered_graph<G, EP, VP>::vertex_descriptor u,
......
......@@ -21,6 +21,8 @@
#include "numpy_bind.hh"
#include "hash_map_wrap.hh"
#include <boost/math/special_functions/gamma.hpp>
using namespace std;
using namespace boost;
using namespace graph_tool;
......@@ -266,9 +268,9 @@ double log_n_permutations(const vector<int32_t>& b)
std::vector<int32_t> count(b.size());
for (auto bi : b)
count[bi]++;
double n = boost::lgamma(b.size() + 1);
double n = boost::math::lgamma(b.size() + 1);
for (auto nr : count)
n -= boost::lgamma(nr + 1);
n -= boost::math::lgamma(nr + 1);
return n;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment