pub fn compute_centrality(
graph: &ArborGraph,
iterations: usize,
damping: f64,
) -> CentralityScoresExpand description
Computes production-aware centrality scores for all nodes in the graph.
Uses a modified PageRank where:
- Nodes initialize with equal score
- Each iteration distributes scores along edges
- Callers from test/spec/fixture files contribute 10x less weight — prevents test utilities from appearing more central than production code
- Scores are normalized to [0.0, 1.0]
§Arguments
graph- The graph to analyzeiterations- Number of iterations (10-20 is usually enough)damping- Damping factor (0.85 is standard)