Skip to main content

betweenness_centrality

Function betweenness_centrality 

Source
pub fn betweenness_centrality(
    store: &LpgStore,
    normalized: bool,
) -> FxHashMap<NodeId, f64>
Expand description

Computes betweenness centrality using Brandes’ algorithm.

Betweenness centrality measures how often a node lies on shortest paths between other nodes.

§Arguments

  • store - The graph store
  • normalized - Whether to normalize by 2/((n-1)(n-2)) for directed graphs

§Returns

Betweenness centrality score for each node.

§Complexity

O(V × E) for unweighted graphs