Closed loeiten closed 4 years ago
Snippet for example graph
import networkx as nx
g = nx.DiGraph()
for i in range(10):
g.add_node(i, status="ready")
# Pre processors to 0
g.add_edge(1, 0)
g.add_edge(2, 0)
# Post processors from 0
g.add_edge(0, 3)
g.add_edge(0, 4)
g.add_edge(0, 6)
g.add_edge(0, 7)
# Pre processors to 5
g.add_edge(6, 5)
g.add_edge(7, 5)
g.add_edge(9, 5)
# Post processors to 5
g.add_edge(5, 8)
# Pre processor to 10
g.add_edge(7, 10)
g.add_edge(9, 10)
# Post processor to 10
g.add_edge(10, 8)
print(nx.nx_pydot.to_pydot(g))
Due to code refactor