pub fn k_shortest_paths<N, E, Ix>(
graph: &Graph<N, E, Ix>,
source: &N,
target: &N,
k: usize,
) -> Result<Vec<(f64, Vec<N>)>>
Expand description
Finds K shortest paths between two nodes using Yen’s algorithm
Returns up to k shortest paths sorted by total weight. Each path includes the total weight and the sequence of nodes.