Commit d5ff8f90 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix edge count bug in condensation_graph()

parent e4e05a4d
......@@ -92,8 +92,9 @@ struct get_community_network
ce = comm_edges[make_pair(ct, cs)];
else
{
ce = add_edge(cs,ct,cg).first;
ce = add_edge(cs, ct, cg).first;
comm_edges[make_pair(cs, ct)] = ce;
cedge_index[ce] = comm_edges.size() - 1;
}
edge_count[ce] += get(weight, *e);
}
......
......@@ -341,7 +341,7 @@ def condensation_graph(g, prop, weight=None):
libgraph_tool_community.community_network(g._Graph__graph,
gp._Graph__graph,
_prop("v", g, prop),
_prop("v", g, vcount),
_prop("e", g, ecount),
_prop("v", gp, vcount),
_prop("e", gp, ecount),
_prop("e", g, weight))
return gp, vcount, ecount
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