Skip to main content

load_centrality

Function load_centrality 

Source
pub fn load_centrality(graph: &Graph) -> LoadCentralityResult
Expand description

Compute load centrality for all nodes in an undirected graph.

Load centrality of a node is the fraction of all shortest paths that pass through that node. This is similar to betweenness centrality but computed using a different accumulation method.

The algorithm uses BFS from each node to compute shortest paths and accumulates the load (number of shortest paths) through each node.

Matches networkx.load_centrality.