MCPcopy Index your code
hub / github.com/jwasham/practice-python / get_neighbor

Method get_neighbor

graphs/directed_graph_list.py:32–40  ·  view source on GitHub ↗

Generator for returning the next vertex adjacent to the given vertex :param vertex: :return:

(self, vertex)

Source from the content-addressed store, hash-verified

30 yield v
31
32 def get_neighbor(self, vertex):
33 """
34 Generator for returning the next vertex adjacent to the given vertex
35 :param vertex:
36 :return:
37 """
38 if vertex in self.adjacency_list:
39 for u in self.adjacency_list[vertex]:
40 yield u
41
42 def get_reverse_neighbor(self, vertex):
43 """

Callers 5

dfsMethod · 0.95
bfsMethod · 0.95
contains_cycleMethod · 0.95
topological_sortMethod · 0.95
dfs_forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected