距离度量#

图直径、半径、离心率和其他属性。

barycenter(G[, weight, attr, sp])

计算连通图的重心,可选择包含边权重。

center(G[, e, usebounds, weight])

返回图 G 的中心。

diameter(G[, e, usebounds, weight])

返回图 G 的直径。

harmonic_diameter(G[, sp])

返回图 G 的调和直径。

eccentricity(G[, v, sp, weight])

返回 G 中节点的离心率。

effective_graph_resistance(G[, weight, ...])

返回图 G 的有效图电阻。

kemeny_constant(G, *[, weight])

返回给定图的 Kemeny 常数。

periphery(G[, e, usebounds, weight])

返回图 G 的外围。

radius(G[, e, usebounds, weight])

返回图 G 的半径。

resistance_distance(G[, nodeA, nodeB, ...])

返回图 G 中节点对之间的电阻距离。