# eccentricity

From igraph v0.6.5-2
by Gabor Csardi

##### Eccentricity and radius

The eccentricity of a vertex is its shortest path distance from the farthest other node in the graph. The smallest eccentricity in a graph is called its radius

- Keywords
- graphs

##### Usage

```
eccentricity(graph, vids=V(graph), mode=c("all", "out", "in", "total"))
radius(graph, mode=c("all", "out", "in", "total"))
```

##### Arguments

- graph
- The input graph, it can be directed or undirected.
- vids
- The vertices for which the eccentricity is calculated.
- mode
- Character constant, gives whether the shortest paths to or
from the given vertices should be calculated for directed graphs. If
`out`

then the shortest paths*from*the vertex, if`in`

then*to*it will be c

##### Details

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. Isolate vertices have eccentricity zero.

##### Value

`eccentricity`

returns a numeric vector, containing the eccentricity score of each given vertex.`radius`

returns a numeric scalar.

##### concept

- Eccentricity
- Radius

##### References

Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 35, 1994.

##### See Also

`shortest.paths`

for general shortest path
calculations.

##### Examples

```
g <- graph.star(10, mode="undirected")
eccentricity(g)
radius(g)
```

*Documentation reproduced from package igraph, version 0.6.5-2, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.