MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / clear_graph

Method clear_graph

graphs/graph_adjacency_list.py:183–187  ·  view source on GitHub ↗

Clears all vertices and edges.

(self)

Source from the content-addressed store, hash-verified

181 return destination_vertex in self.adj_list[source_vertex]
182
183 def clear_graph(self) -> None:
184 """
185 Clears all vertices and edges.
186 """
187 self.adj_list = {}
188
189 def __repr__(self) -> str:
190 return pformat(self.adj_list)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected