Ejemplo n.º 1
0
 def traceback_path(n1, n2):
     """
     Find a common pred where
      pred -> n1
      pred -> some_node -> n2
     """
     assert G.in_degree(n1) == 1
     pred = G.predecessors(n1)[0]
     return path_finder(G, n2, pred, [n2], 2)
Ejemplo n.º 2
0
 def traceback_path(n1, n2):
     """
     Find a common pred where
      pred -> n1
      pred -> some_node -> n2
     """
     assert G.in_degree(n1) == 1
     pred = G.predecessors(n1)[0]
     return path_finder(G, n2, pred, [n2], 2)