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

Add shortest path iterator #5

Open
octavonce opened this issue Mar 14, 2019 · 6 comments
Open

Add shortest path iterator #5

octavonce opened this issue Mar 14, 2019 · 6 comments
Labels
feature A feature to be implemented
Milestone

Comments

@octavonce
Copy link
Contributor

In order to support more use cases, we can add a shortest path between two nodes iterator.

@octavonce octavonce added this to the 0.2 milestone Mar 14, 2019
@octavonce octavonce added the feature A feature to be implemented label Mar 14, 2019
@cherrygot-personal
Copy link
Contributor

What should be preferred? Bellman–Ford or Dijkstra's algorithm. Or both!

@octavonce
Copy link
Contributor Author

Yes! We can certainly do both!

We can expose them as Graph::bellman_ford() and Graph::dijkstra().

@cherrygot-personal
Copy link
Contributor

I was trying to implement the Dijkstra algorithm, but found that there is no method to get the weight of edge between two vertices. Maybe you can help. If I have 'VertexId's of two nodes, how would I know weight of edge between them?

@octavonce
Copy link
Contributor Author

octavonce commented Mar 25, 2019

Maybe we need to do these first: #4 #3 and also include a Graph::weight method which receives as parameters two VertexId structs.

octavonce pushed a commit that referenced this issue Nov 22, 2019
Update criterion requirement from 0.2.10 to 0.3.0
@cemeyer
Copy link

cemeyer commented Dec 9, 2021

Graph::dijkstra() and iterator::Dijkstra exist now.

@saona-raimundo
Copy link

Sorry if this is out of nowhere, but would it not be a more productive approach to implement the traits in petgraph to get access to all their algorithms implemented in petgraph::algo?

Is it because of the no-std option that this route was not taken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature to be implemented
Projects
None yet
Development

No branches or pull requests

4 participants