(list)
| 790 | """ |
| 791 | # Based on: Connelly Barnes, http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/119466 |
| 792 | def flatten(list): |
| 793 | # Flattens a linked list of the form [0,[1,[2,[]]]] |
| 794 | while len(list) > 0: |
| 795 | yield list[0]; list=list[1] |
| 796 | G = adjacency(graph, directed=directed, heuristic=heuristic) |
| 797 | q = [(0, id1, ())] # Heap of (cost, path_head, path_rest). |
| 798 | visited = set() # Visited nodes. |
no test coverage detected
searching dependent graphs…