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

Create some new options for BFSIterator #389

Merged
merged 8 commits into from
Sep 28, 2024
Merged

Conversation

Tortar
Copy link
Contributor

@Tortar Tortar commented Jun 26, 2024

Fixes #288.

This PR adds 2 new options, which can be useful when iterating in BFS:

  • depth_limit: specify the maximum level at which BFS should stop beforehand.
  • neighbors_type: specify which function to use when iterating in BFS, e.g. sometimes using inneighbors could be useful and this allows that

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.31%. Comparing base (ec6ab1b) to head (9e814be).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #389   +/-   ##
=======================================
  Coverage   97.31%   97.31%           
=======================================
  Files         120      120           
  Lines        6953     6956    +3     
=======================================
+ Hits         6766     6769    +3     
  Misses        187      187           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tortar
Copy link
Contributor Author

Tortar commented Jul 12, 2024

Bump, I have some use cases for this, it should be easy to review

@Tortar
Copy link
Contributor Author

Tortar commented Sep 25, 2024

Can someone take a look?

Copy link
Member

@gdalle gdalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, don't hesitate to ping like you did

src/iterators/bfs.jl Outdated Show resolved Hide resolved
src/iterators/bfs.jl Outdated Show resolved Hide resolved
test/iterators/bfs.jl Show resolved Hide resolved
@Tortar
Copy link
Contributor Author

Tortar commented Sep 26, 2024

let me know if you have more review suggestions @gdalle and thank you for taking a look!

@Tortar
Copy link
Contributor Author

Tortar commented Sep 28, 2024

Let me know if there is still something to address @gdalle

@Tortar
Copy link
Contributor Author

Tortar commented Sep 28, 2024

If you could release a new version with this I would be grateful so that I can use it in another package

Copy link
Member

@gdalle gdalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! I'll tag a release

@gdalle gdalle merged commit 039b4cb into JuliaGraphs:master Sep 28, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

Function to return the adjacent nodes of a given node at a distance greater than 1
2 participants