Skip to main content

rwpe_vertices

Function rwpe_vertices 

Source
pub fn rwpe_vertices(
    graph: &Graph,
    vertices: &[VertexId],
    k_steps: usize,
) -> IgraphResult<Vec<Vec<f64>>>
Expand description

Compute RWPE only for specified vertices (more efficient for batches).

ยงExamples

use rust_igraph::{Graph, rwpe_vertices};

let g = Graph::from_edges(&[(0,1),(1,2),(2,3),(3,0)], false, Some(4)).unwrap();
let pe = rwpe_vertices(&g, &[0, 2], 3).unwrap();
assert_eq!(pe.len(), 2);
assert_eq!(pe[0].len(), 3);