(self, s, d)
| 793 | |
| 794 | # grab from https://www.geeksforgeeks.org/find-paths-given-source-destination/ |
| 795 | def get_all_paths(self, s, d): |
| 796 | visited = {k: False for k in self.vertices} |
| 797 | path = [] |
| 798 | all_paths = [] |
| 799 | |
| 800 | def _get_all_paths_util(graph, u, d, visited, path): |
| 801 | visited[u] = True |
| 802 | path.append(u) |
| 803 | if u == d: |
| 804 | all_paths.append(copy.deepcopy(path)) |
| 805 | else: |
| 806 | for i in graph[u]: |
| 807 | if not visited[i]: |
| 808 | _get_all_paths_util(graph, i, d, visited, path) |
| 809 | path.pop() |
| 810 | visited[u] = False |
| 811 | |
| 812 | _get_all_paths_util(self.graph, s, d, visited, path) |
| 813 | return all_paths |
| 814 | |
| 815 | @staticmethod |
| 816 | def from_ssa(ssa): |
no outgoing calls
no test coverage detected