centrality_generalized_closeness: Generalized Closeness Centrality

View source: R/centrality.R

centrality_generalized_closenessR Documentation

Generalized Closeness Centrality

Description

Sum of alpha^d over all nodes. Generalization of decay centrality matching tidygraph's implementation.

Usage

centrality_generalized_closeness(x, mode = "all", decay_parameter = 0.5, ...)

Arguments

x

Network input (matrix, igraph, network, cograph_network, tna object).

mode

For directed networks: "all" (default), "in", or "out".

decay_parameter

Numeric between 0 and 1 (the alpha parameter). Default 0.5.

...

Additional arguments passed to centrality.

Value

Named numeric vector of generalized closeness values.

See Also

centrality for computing multiple measures at once, centrality_decay (equivalent formulation).

Examples

adj <- matrix(c(0, 1, 0, 1, 0, 1, 0, 1, 0), 3, 3)
rownames(adj) <- colnames(adj) <- c("A", "B", "C")
centrality_generalized_closeness(adj)

cograph documentation built on May 31, 2026, 5:06 p.m.