The Wiener index of G, which is the sum of distances between all
pairs of vertices.
Instances For
def
SimpleGraph.computable_wiener
{α : Type u_1}
[Fintype α]
[DecidableEq α]
(G : SimpleGraph α)
[DecidableRel G.Adj]
:
Computable Wiener index: half the sum of all ordered pairwise distances.
Equations
- G.computable_wiener = (∑ u : α, ∑ v : α, G.computable_dist u v) / 2
Instances For
theorem
SimpleGraph.wiener_eq_computable
{α : Type u_1}
[Fintype α]
[DecidableEq α]
(G : SimpleGraph α)
[DecidableRel G.Adj]
: