pub fn dijkstra_path_to_with_mode(
graph: &Graph,
source: VertexId,
target: VertexId,
weights: &[f64],
mode: DijkstraMode,
) -> IgraphResult<Option<(Vec<VertexId>, Vec<u32>)>>Expand description
Mode-aware dijkstra_path_to. Counterpart of
igraph_get_shortest_path_dijkstra(_, _, _, source, target, weights, mode).
ยงExamples
use rust_igraph::{Graph, dijkstra_path_to_with_mode, DijkstraMode};
let mut g = Graph::with_vertices(3);
g.add_edge(0, 1).unwrap();
g.add_edge(1, 2).unwrap();
let (vs, es) = dijkstra_path_to_with_mode(&g, 0, 2, &[1.0, 1.0], DijkstraMode::All)
.unwrap().unwrap();
assert_eq!(vs, vec![0, 1, 2]);