gives the mean distance between all pairs of vertices in the graph g.
uses rules vw to specify the graph g.
Details and Options
- MeanGraphDistance[g] is the average length of all shortest paths between vertices of g.
Examplesopen allclose all
Basic Examples (2)
Use Method->"UnitWeight" to ignore edge weights:
Distribution of the average number of relations connecting two people in a WattsStrogatzGraphDistribution social network model:
Properties & Relations (5)
Compute the off-diagonal mean when the diagonal of GraphDistanceMatrix is 0:
Use CompleteGraphQ to test for complete graphs:
The mean graph distance of a disconnected graph is Infinity:
Use ConnectedGraphQ to test for connected graphs: