radius | R Documentation |
The eccentricity of a vertex is its distance from the farthest other node in the graph. The smallest eccentricity in a graph is called its radius.
radius(graph, ..., weights = NULL, mode = c("all", "out", "in", "total"))
graph |
The input graph, it can be directed or undirected. |
... |
These dots are for future extensions and must be empty. |
weights |
Possibly a numeric vector giving edge weights. If this is
|
mode |
Character constant, gives whether the shortest paths to or from
the given vertices should be calculated for directed graphs. If |
The eccentricity of a vertex is calculated by measuring the shortest distance from (or to) the vertex, to (or from) all vertices in the graph, and taking the maximum.
This implementation ignores vertex pairs that are in different components. Isolated vertices have eccentricity zero.
A numeric scalar, the radius of the graph.
Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 35, 1994.
eccentricity()
for the underlying
calculations, distances for general shortest path
calculations.
Other paths:
all_simple_paths()
,
diameter()
,
distance_table()
,
eccentricity()
,
graph_center()
g <- make_star(10, mode = "undirected")
eccentricity(g)
radius(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.