pub fn find_directed_path<'a, G, D, W, H>(
    g: &'a G,
    src: G::Node<'a>,
    snk: G::Node<'a>,
    weights: W,
    heur: H
) -> Option<(Vec<G::Edge<'a>>, D)>where
    G: Digraph,
    G::Node<'a>: Hash,
    D: Copy + PartialOrd + Zero + Add<D, Output = D> + Sub<D, Output = D>,
    W: Fn(G::Edge<'a>) -> D,
    H: Heuristic<G::Node<'a>>,
    H::Result: Add<D, Output = D> + Add<H::Result, Output = H::Result> + Neg<Output = H::Result>,
Expand description

Run a bidirectional A*-search on an directed graph and return the path.

This is a convenience wrapper to run the search on an directed graph with the default data structures and obtain the shortest path.

Parameters

  • g: the directed graph
  • src: 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
  • heur: the heuristic used in the search

The function returns the edges on the path and its length.