如果您从 R 中使用 igraph,请使用此选项
strength {igraph} | R 文档 |
对每个顶点的相邻边的边权重求和。
strength(
graph,
vids = V(graph),
mode = c("all", "out", "in", "total"),
loops = TRUE,
weights = NULL
)
图 |
输入图。 |
vids |
将计算强度的顶点。 |
模式 |
字符串,“out”表示出度,“in”表示入度,“all”表示两者之和。对于无向图,此参数将被忽略。 |
循环 |
逻辑值;是否也计算环边。 |
weights |
权重向量。如果图具有 |
一个数值向量,表示顶点的强度。
Gabor Csardi csardi.gabor@gmail.com
Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, Alessandro Vespignani: The architecture of complex weighted networks, Proc. Natl. Acad. Sci. USA 101, 3747 (2004)
degree
表示未加权版本。
g <- make_star(10)
E(g)$weight <- seq(ecount(g))
strength(g)
strength(g, mode="out")
strength(g, mode="in")
# No weights, a warning is given
g <- make_ring(10)
strength(g)