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

Specialize graph.all_simple_paths for pythran case #2223

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

serge-sans-paille
Copy link
Owner

We always have one source and one target, so specialize the algorithm for this setup, which should greatly reduce the execution time of #2216

As a side effect, introduce a minimal test suite for graph.all_simple_paths, adapted from networkx test suite.

Instead of creating all possible paths from src to dst and checking
them, check while flooding the graph, which is much less costly.

As a side effect, remove graph.all_simple_paths, which was previously
used and responsible fro the performance issue.

Fix #2216
@serge-sans-paille serge-sans-paille merged commit 07bb22c into master Jul 18, 2024
18 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.

1 participant