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

Method __repr__

graphs/prim.py:34–36  ·  view source on GitHub ↗

Return the vertex id.

(self)

Source from the content-addressed store, hash-verified

32 return self.key < other.key
33
34 def __repr__(self):
35 """Return the vertex id."""
36 return self.id
37
38 def add_neighbor(self, vertex):
39 """Add a pointer to a vertex at neighbor's list."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected