Skip to main content

eccentricity_weighted

Function eccentricity_weighted 

Source
pub fn eccentricity_weighted(
    graph: &Graph,
    weights: &[f64],
) -> IgraphResult<Vec<f64>>
Expand description

OUT-mode default for eccentricity_weighted_with_mode. Counterpart of igraph_eccentricity(_, weights, _, igraph_vss_all(), IGRAPH_OUT).

ยงExamples

use rust_igraph::{Graph, eccentricity_weighted};

let mut g = Graph::with_vertices(3);
g.add_edge(0, 1).unwrap();
g.add_edge(1, 2).unwrap();
let e = eccentricity_weighted(&g, &[1.0, 2.0]).unwrap();
assert!((e[0] - 3.0).abs() < 1e-9);
assert!((e[1] - 2.0).abs() < 1e-9);