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

Shortest path functions with cutoff distance #2358

Open
szhorvat opened this issue Jun 3, 2023 · 4 comments · May be fixed by #2362
Open

Shortest path functions with cutoff distance #2358

szhorvat opened this issue Jun 3, 2023 · 4 comments · May be fixed by #2362
Assignees
Labels
wishlist Feature request that has not been chosen for implementation yet; vote or comment to prioritize it!

Comments

@szhorvat
Copy link
Member

szhorvat commented Jun 3, 2023

What is the feature or improvement you would like to see?

igraph_distances(_dijkstra)() has a cutoff version, which does not consider paths longer than a threshold value.

This is a request to implement the same for igraph_get_shortest_paths(_dijkstra)().

Use cases for the feature

@GroteGnoom GroteGnoom self-assigned this Jun 4, 2023
@GroteGnoom GroteGnoom linked a pull request Jun 10, 2023 that will close this issue
@GroteGnoom
Copy link
Member

Note: what's required for direct betweenness is cutoff versions of igraph_get_all_shortest_paths(_dijkstra)()

@szhorvat
Copy link
Member Author

szhorvat commented Jul 9, 2023

This brings up an interesting question:

Should the comparison with the cutoff be done with tolerances, even in the current functions? Do we get paths which are < cutoff or <= cutoff? It this documented for existing functions? Are there cases where they return an unexpected result due to roundoff errors?

@GroteGnoom
Copy link
Member

GroteGnoom commented Jul 15, 2023

This brings up an interesting question:

Should the comparison with the cutoff be done with tolerances, even in the current functions? Do we get paths which are < cutoff or <= cutoff? It this documented for existing functions? Are there cases where they return an unexpected result due to roundoff errors?

😬 There's probably going to be issues without tolerances, but I haven't seen them yet.

I see IGRAPH_SHORTEST_PATH_EPSILON is used for comparisons.

I think you want inclusive? Like if you say the cutoff is 3.0, then you want to include paths with length 3.0? To me that seems more usual than wanting everything below 3.0.

@szhorvat
Copy link
Member Author

Please skip the tolerances for now. I'll write later about why (on my phone).

I think elsewhere we used <= cutoff, so let's use that here too for consistency

@szhorvat szhorvat added the wishlist Feature request that has not been chosen for implementation yet; vote or comment to prioritize it! label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wishlist Feature request that has not been chosen for implementation yet; vote or comment to prioritize it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants