Macaulay2 » Documentation
Packages » Graphs :: eccentricity
next | previous | forward | backward | up | index | toc

eccentricity -- Returns the eccentricity of a vertex of a graph

Description

The eccentricity of a vertex is the maximal distance between the given vertex and any other vertex in the graph. It gives a measure of how far away a vertex is from the rest of the graph.

i1 : eccentricity(pathGraph 5, 2)

o1 = 2
i2 : eccentricity(pathGraph 5, 1)

o2 = 3
i3 : eccentricity(pathGraph 5, 0)

o3 = 4

See also

Ways to use eccentricity:

  • eccentricity(Graph,Thing)

For the programmer

The object eccentricity is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/Graphs.m2:3570:0.