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

Method add_edge

graphs/prim.py:42–44  ·  view source on GitHub ↗

Destination vertex and weight.

(self, vertex, weight)

Source from the content-addressed store, hash-verified

40 self.neighbors.append(vertex)
41
42 def add_edge(self, vertex, weight):
43 """Destination vertex and weight."""
44 self.edges[vertex.id] = weight
45
46
47def connect(graph, a, b, edge):

Callers 1

connectFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected