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

depth info in TopologicalSort #123

Closed
williamfzc opened this issue May 13, 2023 · 5 comments
Closed

depth info in TopologicalSort #123

williamfzc opened this issue May 13, 2023 · 5 comments
Labels
question Further information is requested

Comments

@williamfzc
Copy link
Contributor

Hi :) This is a discussion.

While TopologicalSort is the appropriate API for our needs, it has a limitation in that the depth information of the nodes cannot be easily represented by a single slice. This can make it challenging to determine which nodes belong to which level after obtaining the sorted slice.

Are there any existed methods I have missed?

@dominikbraun dominikbraun added the question Further information is requested label May 13, 2023
@dominikbraun
Copy link
Owner

Hi! One question upfront: Would it be feasible for you to store the depth information as a vertex attribute, or would that be too much manual effort?

@williamfzc
Copy link
Contributor Author

Yes I agree.
Currently what we want is, walking the whole graph, and getting and storing these depth informations to vertex attributions.

Both BFS and DFS require an initial node and cannot traverse the entire graph. In comparison, Topological Sort seems more appropriate.

@dominikbraun
Copy link
Owner

dominikbraun commented May 14, 2023

@williamfzc Ok, but I'm planning to add methods for running a DFS und BFS over the entire graph, not just over the nodes that are reachable from the start vertex. I've opened #124 for this.

@williamfzc
Copy link
Contributor Author

@williamfzc Ok, but I'm planning to add methods for running a DFS und BFS over the entire graph, not just over the nodes that are reachable from the start vertex. I've opened #124 for this.

Good idea and lets continue in #124

@dominikbraun
Copy link
Owner

Maybe #61 could also be interesting in this context.

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

No branches or pull requests

2 participants