Computes the global efficiency of a network - the average of the inverse shortest path lengths between all pairs of nodes. Higher values indicate better global communication efficiency. Handles disconnected graphs gracefully (infinite distances contribute 0).
Usage
network_global_efficiency(
x,
directed = NULL,
weights = NULL,
invert_weights = NULL,
alpha = 1,
...
)Arguments
- x
Network input: matrix, igraph, network, cograph_network, or tna object
- directed
Logical. Consider edge direction? Default TRUE for directed graphs.
- weights
Edge weights (NULL for unweighted). Set to NA to ignore existing weights.
- invert_weights
Logical or NULL. Invert weights so higher weights = shorter paths? Default NULL which auto-detects: TRUE for tna objects, FALSE otherwise (matching igraph/sna). Set TRUE for strength/frequency weights (qgraph style).
- alpha
Numeric. Exponent for weight inversion: distance = 1/weight^alpha. Default 1.
- ...
Additional arguments passed to
to_igraph
