-
Notifications
You must be signed in to change notification settings - Fork 6
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 some basic graph functionality #172
Labels
pull-request
A pull request discussion ticket
Comments
@runarorama - I merged this while you're out, hope that is okay. All the definitions are under
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This PR adds some graph functionality similar to Haskell's
Data.Graph
. The code is at@unison/base/@dolio/graphs
Added are types for graphs and strongly connected components. There are functions for building, topologically sorting and finding the SCCs of a graph, as well as some miscellaneous functionality that was useful for that and for creating tests. I also made some simple random graph generators for the tests (one generates DAGs, because
topSort
will fail on graphs with cycles).The text was updated successfully, but these errors were encountered: