pub fn shortest_path<V>(
q: &GraphQuery<V>,
weight: &TraversalWeight<V>,
from: &Pattern<V>,
to: &Pattern<V>,
) -> Option<Vec<Pattern<V>>>Expand description
Find the minimum-cost path from from to to using Dijkstra’s algorithm.
- Same node: returns
Some(vec![node])immediately. - No path: returns
None. - Uses
f64::INFINITYcost to mark impassable edges.