pub struct Dijkstra<'a, G, W, N, E, H = BinHeap<NodeItem<N, E, W>, usize>>where
    G: 'a + IndexGraph<'a, Node = N, Edge = E>,
    N: 'a + Node + Hash,
    E: 'a + Edge,
    W: NumAssign + Ord + Copy,
    H: Heap<Key = NodeItem<G::Node, G::Edge, W>, Item = usize>,
{ /* private fields */ }
Expand description

Dijkstra’s shortest path algorithm.

Implementations

Create new data structure for running Dijkstra on a graph.

Compute a shortest path with Dijkstra’s algorithm on an undirected graph.

Each edge can be traversed in both directions with the same weight.

  • weights the (non-negative) edge weights
  • src the source node
  • snk the sink node

Return the incoming edge for each node forming the shortest path tree.

Solve shortest path with Dijkstra as bidirected graph.

The graph is considered as bidirected graph with different weights for each direction.

  • weights the (non-negative) arc weights
  • src the source node
  • snk the sink node

Return the incoming arc for each node forming the shortest path tree.

Solve shortest path with Dijkstra as directed graph.

The graph is considered directed, travel is only allowed along outgoing edges.

  • weights the (non-negative) arc weights
  • src the source node
  • snk the sink node

Return the incoming arc for each node forming the shortest path tree.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.