-
Notifications
You must be signed in to change notification settings - Fork 445
Graph Structure #208
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
Comments
Hi,
Given that this per description is
This seems like a good case for a |
I think the topological sort algorithm itself could be appropriate for this package. For example, the Swift Package Manager codebase has a generic implementation of this algorithm as a single function. |
Hi all, since this issue is still open, I guess it is still to be implemented. I would start with the generic implementation suggested by @fumoboy007. In this regard, I was thinking:
What are your thoughts on this? |
How would you use such an API on a generic sequence or collection? |
Good question. I am only speculating. One could
|
As @LucianoPAlmeida has said, it doesn't sound like this API fits within the description of this package. |
Apologies if this has been discussed, I looked just about everywhere I could think before creating the feature. I recently came into a need for a graph with a topological sort and was somewhat surprised to see there just don't appear to be Swift implementations that are really ready to use. There's some sparse projects that are kinda getting there...and then there's Swift Algorithm Club at least demonstrating how it could be pulled off.
To that end, I wonder if this library could benefit from an
AdjacencyListGraph
sequence type. I know that it'd be useful in a few different things I'm building, and building the data structure per project is a bit daunting. I'm hardly a Graph expert, but assuming general support, I'd be happy to create a draft PR for it and take on the dev effort.The text was updated successfully, but these errors were encountered: