Skip to main content

centralization_eigenvector_centrality_tmax

Function centralization_eigenvector_centrality_tmax 

Source
pub fn centralization_eigenvector_centrality_tmax(
    nodes: usize,
    mode: NeighborMode,
) -> Result<f64>
Expand description

Theoretical maximum of eigenvector centralization for a graph with nodes vertices (igraph_centralization_eigenvector_centrality_tmax with a null graph).

The graph is considered directed unless mode is NeighborMode::All. The most centralized undirected structure is a graph with a single edge; the directed one is the in-star (for NeighborMode::Out) or the out-star (for NeighborMode::In). Scores are assumed to be scaled so that the maximum is 1. Time complexity: O(1).

Binds igraph_centralization_eigenvector_centrality_tmax.

ยงExamples

use igraph::{centrality::centralization_eigenvector_centrality_tmax, prelude::*};

// Undirected: n - 2 (one edge, all other scores zero).
assert_eq!(centralization_eigenvector_centrality_tmax(10, NeighborMode::All).unwrap(), 8.0);