顶点的离心率是它到图中其他最远节点的距离。图中最小的离心率称为半径。
用法
radius(graph, ..., weights = NULL, mode = c("all", "out", "in", "total"))
参见
eccentricity()
用于底层计算,distances 用于一般最短路径计算。
其他路径:all_simple_paths()
, diameter()
, distance_table()
, eccentricity()
, graph_center()
示例
g <- make_star(10, mode = "undirected")
eccentricity(g)
#> [1] 1 2 2 2 2 2 2 2 2 2
radius(g)
#> [1] 1