pub fn pagerank(
adjacency: &[Vec<usize>],
damping: f64,
iterations: usize,
) -> Vec<f64>Expand description
Simple iterative PageRank computation.
§Parameters
adjacency: outgoing adjacency list —adjacency[i]contains the indices of nodes that nodeilinks to.damping: damping factor (typically 0.85).iterations: number of power-iteration steps.
§Returns
A Vec<f64> of length adjacency.len() with the PageRank score for each node.
Scores are normalised so that they sum to 1.0.