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
With many vertices and not many edges, the Dijkstra algorithm fails on the following line:
//_edgeTo = new WeightedEdge[_edgesCount];
which now runs with the following line:
_edgeTo = new WeightedEdge[_verticesCount];
Similarly the test for optimality fails in DijkstraShortestPaths with directed edges, I think because code fails due to adding an edge weight to Infinity, when it should not do this for the directed edge when the edge is not in the right direction.
Thanks for reporting this. I will try to fix it as soon as my time allows. If you know how to solve this, and wish to contribute to this repository, then fix it and I'll be happy to review and merge your pull request.
Thanks for reporting this. I will try to fix it as soon as my time allows.
If you know how to solve this, and wish to contribute to this repository,
then fix it and I'll be happy to review and merge your pull request.
Cheers!
—
Reply to this email directly or view it on GitHub #13 (comment)
.
With many vertices and not many edges, the Dijkstra algorithm fails on the following line:
//_edgeTo = new WeightedEdge[_edgesCount];
which now runs with the following line:
_edgeTo = new WeightedEdge[_verticesCount];
Similarly the test for optimality fails in DijkstraShortestPaths with directed edges, I think because code fails due to adding an edge weight to Infinity, when it should not do this for the directed edge when the edge is not in the right direction.
//Debug.Assert(_checkOptimalityConditions(Graph, Source));
(_distances[v] + edge.Value < _distances[w])
infinity + an edge weight will be less than distances[w](infinity + positive number) = small number.
The text was updated successfully, but these errors were encountered: