The set of vertices of maximum eccentricity.
Instances For
The average eccentricity of a graph G: the mean of G.eccent v over all vertices,
converted to a real number. Returns 0 if the graph has no vertices.
Equations
- G.averageEccentricity = ↑(∑ v : α, (G.eccent v).toNat) / ↑(Fintype.card α)
Instances For
The diameter of a finite graph as a computable natural number: the maximum BFS distance
(computable_dist) over all ordered pairs of vertices.
Equations
- G.computable_ediam = Finset.univ.sup fun (p : α × α) => G.computable_dist p.1 p.2
Instances For
For a connected finite graph, the extended diameter ediam equals the computable diameter.
The eccentricity of a vertex u in a finite graph as a computable natural number:
the maximum BFS distance (computable_dist) from u to any vertex.
Equations
- G.computable_eccent u = Finset.univ.sup fun (v : α) => G.computable_dist u v
Instances For
The radius of a finite graph as a computable natural number: the minimum, over all vertices, of the computable eccentricity.
Equations
Instances For
For a connected finite graph, the eccentricity eccent u equals the computable eccentricity.
For a connected finite graph, the radius radius equals the computable radius.