URL
https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc
[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [remove_cycle/] [remove_self_loops.py] - Rev 52
Go to most recent revision | Compare with Previous | Blame | View Log
import networkx as nx def remove_self_loops_from_graph(g): self_loops = list(g.selfloop_edges()) g.remove_edges_from(self_loops) return self_loops def remove_self_loops_from_edges_file(graph_file): g = nx.read_edgelist(args.original_graph, nodetype = int, create_using = nx.DiGraph()) return remove_self_loops_from_graph(g)
Go to most recent revision | Compare with Previous | Blame | View Log