Skip to main content

centralization_betweenness_tmax

Function centralization_betweenness_tmax 

Source
pub fn centralization_betweenness_tmax(
    nodes: usize,
    directed: bool,
) -> Result<f64>
Expand description

Theoretical maximum of betweenness centralization for a graph with nodes vertices (igraph_centralization_betweenness_tmax with a null graph).

directed tells whether directed paths are used. The most centralized structure is the star. See igraph_t::centralization_betweenness_tmax to read size and directedness from a graph. Time complexity: O(1).

Binds igraph_centralization_betweenness_tmax.

ยงExamples

use igraph::centrality::centralization_betweenness_tmax;

// Undirected: (n - 1)^2 (n - 2) / 2.
assert_eq!(centralization_betweenness_tmax(5, false).unwrap(), 24.0);