跳到内容

有关图集中化的摘要,请参见centralize()

用法

centr_degree_tmax(
  graph = NULL,
  nodes = 0,
  mode = c("all", "out", "in", "total"),
  loops
)

参数

graph

输入图。如果给出了 nodes,也可以为 NULL

节点

顶点数。如果给出了图,则忽略此项。

mode

degree()mode 参数相同。如果提供了 graph 且图是无向图,则忽略此参数。

loops

逻辑标量,指示在计算度时是否考虑自环边。

实数标量,给定阶数和其他参数的图的理论最大(未归一化)图度中心性得分。

参见

示例

# A BA graph is quite centralized
g <- sample_pa(1000, m = 4)
centr_degree(g, normalized = FALSE)$centralization %>%
  `/`(centr_degree_tmax(g, loops = FALSE))
#> [1] 0.1459476
centr_degree(g, normalized = TRUE)$centralization
#> [1] 0.1458015