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 support for leaf_vertices function? #68

Closed
mmmries opened this issue Jun 24, 2023 · 0 comments
Closed

add support for leaf_vertices function? #68

mmmries opened this issue Jun 24, 2023 · 0 comments

Comments

@mmmries
Copy link

mmmries commented Jun 24, 2023

Hi @bitwalker, thank you for this awesome library. I have a use-case where I'm building up a dependency tree and I want to visit all of the leaf nodes first to resolve those before I bother to visit nodes that I know have unresolved dependencies.

I was thinking that I would fork this repo and open a PR that adds a Graph.leaf_vertices/1 function. I'm guessing that the implementation will look something like iterating through the in_edges keys (things that we know have a dependent) and skipping any items that also appear in the out_edges map. I think that should give me all of the leaf vertices in an efficient way?

I just wanted to check with you first if this was a desirable change to the project before I do the work to open the PR

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

No branches or pull requests

1 participant