Function rs_graph::shortestpath::dijkstra::directed[][src]

pub fn directed<'a, 'b, G, Ws, W>(
    g: &'a G,
    weights: Ws,
    src: G::Node,
    snk: Option<G::Node>
) -> Vec<(G::Node, G::Edge)> where
    G: IndexDigraph<'a>,
    G::Node: Hash,
    Ws: EdgeMap<'a, G, W>,
    W: NumAssign + Ord + Copy

Solve shortest path with Dijkstra as directed graph.

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

  • g the graph
  • 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.