centr_clo_tmax: Theoretical maximum for closeness centralization

Description Usage Arguments Value See Also Examples

View source: R/auto.R

Description

See centralize for a summary of graph centralization.

Usage

1
centr_clo_tmax(graph = NULL, nodes = 0, mode = c("out", "in", "all", "total"))

Arguments

graph

The input graph. It can also be NULL, if nodes is given.

nodes

The number of vertices. This is ignored if the graph is given.

mode

This is the same as the mode argument of closeness.

Value

Real scalar, the theoretical maximum (unnormalized) graph closeness centrality score for graphs with given order and other parameters.

See Also

Other centralization related: centr_betw_tmax(), centr_betw(), centr_clo(), centr_degree_tmax(), centr_degree(), centr_eigen_tmax(), centr_eigen(), centralize()

Examples

1
2
3
4
5
# A BA graph is quite centralized
g <- sample_pa(1000, m = 4)
centr_clo(g, normalized = FALSE)$centralization %>%
 `/`(centr_clo_tmax(g))
centr_clo(g, normalized = TRUE)$centralization

Example output

Attaching package:igraphThe following objects are masked frompackage:stats:

    decompose, spectrum

The following object is masked frompackage:base:

    union

[1] 6.72441e-05
Warning message:
In centr_clo(g, normalized = FALSE) :
  At centrality.c:2784 :closeness centrality is not well-defined for disconnected graphs
[1] 6.72441e-05
Warning message:
In centr_clo(g, normalized = TRUE) :
  At centrality.c:2784 :closeness centrality is not well-defined for disconnected graphs

igraph documentation built on Oct. 15, 2021, 5:06 p.m.