pub fn a_star<F>(
graph: &HashMap<String, Vec<Edge>>,
start: &str,
goal: &str,
heuristic: F,
) -> Result<(Vec<String>, f64), Error>Expand description
A* shortest path.
The heuristic must be non-negative. For an optimal first result it should be admissible and consistent; inconsistent but admissible heuristics still return an optimal path, but may cause nodes to be re-expanded.
All edge weights must be non-negative.