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

Rationale behind custom edge functions #90

Closed
dionyziz opened this issue Aug 25, 2018 · 2 comments
Closed

Rationale behind custom edge functions #90

dionyziz opened this issue Aug 25, 2018 · 2 comments

Comments

@dionyziz
Copy link

dionyziz commented Aug 25, 2018

I would like to ask what the rationale for custom edge functions is. It seems to me that edges are an inherent part of a graph's topology and would be better handled by the library if they were always built into the graph. As we can see in the implementation of dijkstra and Bellman-Ford, this introduces some more convoluted implementation.

What are the benefits for allowing custom edge functions? Why not ask the user to create a new graph with their custom edges embedded?

Thanks!

@gaganpreet
Copy link

I had to use the custom edge functions recently. I needed to simulate how removing an edge could affect the graph. With my own edge function, I was able to get shortest path between nodes without actually modifying or recreating the graph.

@rustedgrail
Copy link
Collaborator

I'm not the original creator and don't know the reason behind the decision, so I'm going to close this. If it's an problem, reopen the issue and let me know what the problem is.

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

No branches or pull requests

3 participants