Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dijkstra algorithm; fix a bunch of bugs; enable all edge weights #8

Closed
wants to merge 90 commits into from

Conversation

runeksvendsen
Copy link
Owner

@runeksvendsen runeksvendsen commented Nov 10, 2023

Closes #6

Also: add debug tracing to all functions that modify the state arrays
Noting that it empties the queue
TODO: test that BellmanFord and Dijkstra give the same results given a graph with non-negative weights.
TODO: re-enable once #5 and #6 are fixed.
Because Bellman-Ford and Dijkstra find two different shortest paths with the same weight sum.

Possible solution: deterministic sorting of output paths with equal length: `map (sortOn uniquePathId) (groupBy pathWeight resultPaths)`.
Also: improve assertion failure message
Synonym for "updateEdge"
Also: remove unused HasWeight constraints
How the hell was this not caught by any tests?!

TODO: Write actually useful tests
@runeksvendsen
Copy link
Owner Author

Will reopen later when closer to done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test suite failure for Properties.BellmanFord.finds negative cycle.with no other edges in the graph.QuickCheck
1 participant