pub fn local_scan_1_ecount(
graph: &Graph,
weights: Option<&[f64]>,
mode: DegreeMode,
) -> IgraphResult<Vec<f64>>Expand description
Local scan-1 edge count / weight sum in the 1-neighbourhood of every vertex, with directed-mode support.
ยงExamples
use rust_igraph::{Graph, local_scan_1_ecount, DegreeMode};
// Triangle 0-1-2 plus pendant 3-0
let mut g = Graph::with_vertices(4);
g.add_edge(0, 1).unwrap();
g.add_edge(1, 2).unwrap();
g.add_edge(2, 0).unwrap();
g.add_edge(3, 0).unwrap();
let res = local_scan_1_ecount(&g, None, DegreeMode::All).unwrap();
assert!((res[0] - 4.0).abs() < 1e-12);
assert!((res[3] - 1.0).abs() < 1e-12);