Commit 9a39a155 authored by Tiago Peixoto's avatar Tiago Peixoto

PPBlockState: fix entropy computation for multigraphs

parent bbe57308
......@@ -440,10 +440,13 @@ public:
for (auto v : vertices_range(_g))
{
S -= lgamma_fast(out_degree(v, _g) + 1);
gt_hash_map<decltype(v), size_t> us;
for (auto e : out_edges_range(v, _g))
{
auto u = target(e, _g);
if (u < v)
continue;
us[u] += _eweight[e];
}
......
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