Skip to content

VertexEccentricity ​

The greatest distance from a vertex to any other vertex of a Graph.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageVertexEccentricity!
VertexEccentricity(g)the eccentricity of every vertex, in VertexList(g) order.
VertexEccentricity(g, v)just v's eccentricity.
Typed signatures
TypePackageApplies
(value, any?) -> list<real | signed_infinity> | real | signed_infinitycombinatoricsalways

Domain: Collections

Details
  • The moment any OTHER vertex is unreachable from v, the eccentricity is PositiveInfinity -- not just the max over whatever happens to be reachable.
  • Distances respect edge direction, same as GraphDistance.

Examples

Basic #
live ↗
InVertexEccentricity(PetersenGraph(),1)\mathrm{VertexEccentricity}(\mathrm{PetersenGraph}(), 1)Out22
live ↗
InVertexEccentricity(Graph([1,2,3,4],[UndirectedEdge(1,2),UndirectedEdge(3,4)]),1)\mathrm{VertexEccentricity}(\mathrm{Graph}(\bigl\lbrack1, 2, 3, 4\bigr\rbrack, \bigl\lbrack\mathrm{UndirectedEdge}(1, 2), \mathrm{UndirectedEdge}(3, 4)\bigr\rbrack), 1)Out∞∞
About
Examples2
Checked againstWolfram Language 1 agree1 differ
CrosswalkWolfram Language

See also: GraphRadius, GraphDiameter, GraphCenter