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 dfs_labeled_edges reporting of reverse edges due to depth_limit. #6240

Merged
merged 3 commits into from Dec 1, 2022

Conversation

dschult
Copy link
Member

@dschult dschult commented Nov 27, 2022

Fixes #6239

The new reporting of edges labels them as "reverse-depth_limit" rather than simply "reverse" to make clear that they exist due to cutting off the exploration due to reaching the depth_limit.

@dschult dschult added this to the networkx-3.0 milestone Nov 27, 2022
Copy link
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @dschult .

I made a couple minor docstring adjustments in 74f38d6 - please make sure they look okay and feel free to revert if not!

The changed behavior makes sense to me given the discussion in #6239, and I think the new "reverse-depth_limit" is clear

@dschult
Copy link
Member Author

dschult commented Nov 28, 2022

Yes! Thanks for those changes to the doc_string. They look good to me.
:)

networkx/algorithms/traversal/tests/test_dfs.py Outdated Show resolved Hide resolved
Co-authored-by: Mridul Seth <mail@mriduls.com>
@MridulS MridulS merged commit d48ebf2 into networkx:main Dec 1, 2022
@dschult dschult deleted the fix_reverse_dfs branch December 3, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

nx.dfs_labeled_edges does not return last visited edge if depth_limit is specified
3 participants