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 graphweights
the (non-negative) arc weightssrc
the source nodesnk
the sink node
Return the incoming arc for each node forming the shortest path tree.