Skip to main content

widest_paths_to_with_mode

Function widest_paths_to_with_mode 

Source
pub fn widest_paths_to_with_mode(
    graph: &Graph,
    from: VertexId,
    targets: &[VertexId],
    weights: &[f64],
    mode: DijkstraMode,
) -> IgraphResult<Vec<WidestPathResult>>
Expand description

Mode-aware variant of widest_paths_to.

Counterpart of igraph_get_widest_paths(_, vertices, edges, from, to, weights, mode, parents=NULL, inbound_edges=NULL).

ยงExamples

use rust_igraph::{Graph, widest_paths_to_with_mode, DijkstraMode};

let mut g = Graph::with_vertices(3);
g.add_edge(0, 1).unwrap();
g.add_edge(1, 2).unwrap();
let paths = widest_paths_to_with_mode(&g, 0, &[2], &[3.0, 5.0], DijkstraMode::All).unwrap();
assert!(paths[0].is_some());