for neighbour in self.getUnvisitedNodes(uNode):
alt = self.dist[u] + self.weights[(uNode, neighbour)]
if (alt < self.dist[vIndex]):
self.dist[vIndex] = alt
self.previous[vIndex] = uNode
vIndex+=1
So whenever my code enters this if block it skips straight to the second line, I placed a breakpoint on the line of code that's being skipped and the program never pauses, so it's definitely skipping that line. Any help would be appreciated, thank you!
Aucun commentaire:
Enregistrer un commentaire