Skip to content

Add shortest path iterator #5

Open

Description

@octavonce

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

Activity

  1. added this to the 0.2 milestone on Mar 14, 2019
  2. cherrygot-personal commented on Mar 18, 2019

    @cherrygot-personal
    Contributor

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

  3. octavonce commented on Mar 19, 2019

    @octavonce
    ContributorAuthor

    Yes! We can certainly do both!

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

  4. cherrygot-personal commented on Mar 25, 2019

    @cherrygot-personal
    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?

  5. octavonce commented on Mar 25, 2019

    @octavonce
    ContributorAuthor

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

  6. added a commit that references this issue on Nov 22, 2019
  7. cemeyer commented on Dec 9, 2021

    @cemeyer

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

  8. saona-raimundo commented on Jan 12, 2022

    @saona-raimundo

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA feature to be implemented

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions