Commit 396f4d19 authored by Yoann Dufresne's avatar Yoann Dufresne
Browse files

reduction bugfix

parent 6802438f
......@@ -36,8 +36,12 @@ def main():
# Algorithms for reduction
# Take the principal component
largest_component_nodes = max(nx.connected_components(d2g), key=len)
largest_component = d2g.subgraph(largest_component_nodes)
# Write the simplificated graph
nx.write_gexf(d2g, args.output_d2_name)
nx.write_gexf(largest_component, args.output_d2_name)
if __name__ == "__main__":
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