Commit 1f16f29b authored by Lingfan Yu's avatar Lingfan Yu
Browse files

bug fix

parent 96179b0c
...@@ -9,7 +9,7 @@ def convert_graph_to_ordering(g): ...@@ -9,7 +9,7 @@ def convert_graph_to_ordering(g):
ordering = [] ordering = []
h = nx.DiGraph() h = nx.DiGraph()
h.add_edges_from(g.edges) h.add_edges_from(g.edges)
for n in h.nodes(): for n in range(len(h)):
ordering.append(n) ordering.append(n)
for m in h.predecessors(n): for m in h.predecessors(n):
ordering.append((m, n)) ordering.append((m, 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