Conversation
Member
Author
|
I've spent some more time on this in support of the |
Member
Sure! Let's go with this one if you see it works as we need it. What I'm missing from this package (probably I'm not thinking it or checking it through), are these two:
|
Member
Author
Isn't that just: graph := NewGraph()
graph.Add("root") // whatever your concept of the starting point is
graph.TopoSort("root")?
I don't understand the question, can you clarify? |
Member
|
Member
Author
|
Order is always deterministic, it uses the sort order of the keys, so it will be |
unmultimedio
approved these changes
Jun 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Competing idea to #2138.
This started as a vendoring of https://github.com/stevenle/topsort with proper license attribution, plus some cleanups to more closely match our code standards, but evolved into more functionality and more cleanups. We can edit this as we want for our needs. It's a super-simple package, and this is a universal concept.
@unmultimedio any thoughts about starting with this as a base?