Content deleted Content added
merged the information from a duplicate page |
+comments to program |
||
Line 16:
for each edge (u,r) in G do
if Distance(r) > Distance(u) + w(u,r);
return false; //This means that the graph contains a cycle of negative weight and the shortest paths are not well defined
return true; //Lengths of shortest paths are in Distance array
|