swan_efficiency measures the change in the sum of distances between all node pairs when excluding a node from the network.
swan_efficiency(g)
Arguments
g: An igraph object representing the graph to analyze. swan_efficiency is based on geographic accessibility, similar to indices used for assessing transportation network performance, such as closeness accessibility. It quantifies the impact of node removal by calculating the change in the sum of distances between all node pairs.
The code is an adaptation from the NetSwan package that was archived on CRAN.
Returns
A numeric vector where each entry represents the swan_efficiency value for the corresponding node.