You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you consider change the position of self.edges.append([0] * (len(self.edges)+1))
after this line self.vertices[vertex.name] = vertex
Since self.edges.append([0] * (len(self.edges)+1))
is for initializing the matrix to zeros. Especially, adding the first edge, it is not easy to understand. Because when this line changes position it follows the initializing, appending new initialized edges, fill the weight number logic. That will be more easy for comprehension.
The text was updated successfully, but these errors were encountered:
Can you consider change the position of
self.edges.append([0] * (len(self.edges)+1))
after this line
self.vertices[vertex.name] = vertex
Since
self.edges.append([0] * (len(self.edges)+1))
is for initializing the matrix to zeros. Especially, adding the first edge, it is not easy to understand. Because when this line changes position it follows the initializing, appending new initialized edges, fill the weight number logic. That will be more easy for comprehension.
The text was updated successfully, but these errors were encountered: