Skip to main content

pagerank

Function pagerank 

Source
pub fn pagerank(graph: &Graph, iterations: u32, damping_factor: f64) -> Vec<f64>
Expand description

Computes PageRank scores for all nodes using a fixed number of iterations.

§Arguments

  • graph - The graph
  • iterations - Number of iterations to run
  • damping_factor - Damping factor (typically 0.85)

§Returns

Vector of ranks indexed by node ID (as u32)