有关图集中化的摘要,请参见centralize()
。
用法
centr_degree(
graph,
mode = c("all", "out", "in", "total"),
loops = TRUE,
normalized = TRUE
)
参数
- graph
输入图。
- mode
这与
degree()
的mode
参数相同。- loops
逻辑标量,用于指示在计算度时是否考虑环边。
- normalized
逻辑标量。 是否通过除以理论最大值来标准化图级中心性得分。
值
一个包含以下组件的命名列表
- res
节点级中心性得分。
- centralization
图级中心性指数。
- theoretical_max
对于具有给定顶点数的图,使用相同的参数,理论上最大的图级中心化分数。 如果
normalized
参数为TRUE
,则结果除以此数。
参见
其他中心化相关: centr_betw()
, centr_betw_tmax()
, centr_clo()
, centr_clo_tmax()
, centr_degree_tmax()
, centr_eigen()
, centr_eigen_tmax()
, centralize()
示例
# A BA graph is quite centralized
g <- sample_pa(1000, m = 4)
centr_degree(g)$centralization
#> [1] 0.1753605
centr_clo(g, mode = "all")$centralization
#> [1] 0.4440289
centr_betw(g, directed = FALSE)$centralization
#> [1] 0.2695826
centr_eigen(g, directed = FALSE)$centralization
#> [1] 0.9468208