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

Pass list of sources and targets to dijkstra_shortest_paths #1118

Open
thomasaarholt opened this issue Feb 27, 2024 · 0 comments
Open

Pass list of sources and targets to dijkstra_shortest_paths #1118

thomasaarholt opened this issue Feb 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@thomasaarholt
Copy link

What is the expected enhancement?

I have a large graph. Performing path_dict = all_pairs_dijkstra_shortest_paths takes about 1 second, and produces a huge nested dict of 1.6 million source-target combinations.

Of the nodes in the graph, I am only interested in the shortest path between the combination of about 100 source nodes and 100 target nodes (resulting in 500 * 500 paths) of them.

Doing lookup in the path_dict is quite slow when looping over so many locations. I tried using dijkstra_shortest_paths as well, but each lookup is also quite slow, since I have to specify only one target and source at a time.

I would therefore very much appreciate a way to specify more than one target and source to dijkstra_shortest_paths, so as to speed this bit up.

@IvanIsCoding IvanIsCoding added the enhancement New feature or request label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants