[−][src]Function rs_graph::shortestpath::bidijkstra::find_undirected_path
pub fn find_undirected_path<'a, G, D, W>(
g: &'a G,
src: G::Node,
snk: G::Node,
weights: W
) -> Option<(Vec<G::Edge>, D)> where
G: Graph<'a>,
G::Node: Hash,
D: Copy + PartialOrd + Zero + Add<D, Output = D> + Sub<D, Output = D>,
W: Fn(G::Edge) -> D,
Run a bidirectional Dijkstra-search on an undirected graph and return the path.
Each edge can be traversed in both directions with the same weight.
This is a convenience wrapper to run the search on an undirected graph with the default data structures and obtain the shortest path.
Parameters
g
: the undirected graphsrc
: the source node at which the path should start.snk
: the snk node at which the path should end.weights
: the weight function for each edge
The function returns the edges on the path and its length.