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

rustworkx.all_simple_paths returns empty list when the min_depth argument is 0 #955

Closed
yurivict opened this issue Jul 31, 2023 · 2 comments · Fixed by #1015
Closed

rustworkx.all_simple_paths returns empty list when the min_depth argument is 0 #955

yurivict opened this issue Jul 31, 2023 · 2 comments · Fixed by #1015
Assignees
Labels
bug Something isn't working

Comments

@yurivict
Copy link

Information

  • rustworkx version: 0.13.0
  • Python version: 3.9
  • Rust version: 1.71.0
  • Operating system: FreeBSD 13.2

What is the current behavior?

empty list is returned

What is the expected behavior?

correct list is returned

Steps to reproduce the problem

len(rx.all_simple_paths(G, 1, 2, 0, 25)) for any graph

The description says: min_depth (int) – The minimum depth of the path to include in the output list of paths. By default all paths are included regardless of depth, setting to 0 will behave like the default.

The default is None, but the 0 value doesn't behave as the default value.

@yurivict yurivict added the bug Something isn't working label Jul 31, 2023
@yurivict yurivict changed the title rustworkx.all_simple_paths returns emmpty list when the min_depth argument is 0 rustworkx.all_simple_paths returns empty list when the min_depth argument is 0 Aug 1, 2023
@abhamra
Copy link
Contributor

abhamra commented Aug 23, 2023

Hi, I'd like to tackle this problem, if someone could assign this to me that would be great! This is my first time doing open source contributions, and all I've done so far is fork the repo, clone the forked repo, and then create a dev branch on the forked repo. Any other guidance would be appreciated!

@IvanIsCoding
Copy link
Collaborator

You need to update the code in the connectivity module for graph_all_simple_paths and digraph_all_simple_paths

prakharb10 added a commit to prakharb10/retworkx that referenced this issue Oct 22, 2023
IvanIsCoding pushed a commit that referenced this issue Oct 30, 2023
* fix `min_depth=0` in `all_simple_paths`
Fixes #955

* added reno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants