betweenness {igraph}R Documentation

Vertex and edge betweenness centrality

Description

The vertex and edge betweenness are (roughly) defined by the number of geodesics (shortest paths) going through a vertex or an edge.

Usage

betweenness(graph, v=V(graph), directed = TRUE)
edge.betweenness(graph, e=E(graph), directed = TRUE)

Arguments

graph The graph to analyze.
v The vertices for which the vertex betweenness will be calculated.
e The edges for which the edge betweenness will be calculated.
directed Logical, whether directed paths should be considered while determining the shortest paths.

Details

The vertex betweenness of vertex v is defined by

sum( g_ivj / g_ij, i!=j,i!=v,j!=v)

The edge betweenness of edge e is defined by

sum( g_iej / g_ij, i!=j)

.

Value

A numeric vector with the betweenness score for each vertex in v for betweenness.
A numeric vector with the edge betweenness score for each edge in e for edge.betweenness.
For calculating the betweenness a similar algorithm to the one proposed by Brandes is used.

Note

edge.betweenness might give false values for graphs with multiple edges.

Author(s)

Gabor Csardi csardi@rmki.kfki.hu

References

Freeman, L.C. (1979). Centrality in Social Networks I: Conceptual Clarification. Social Networks, 1, 215-239.

Ulrik Brandes, A Faster Algorithm for Betweenness Centrality. Journal of Mathematical Sociology 25(2):163-177, 2001.

See Also

closeness, degree

Examples

g <- random.graph.game(10, 3/10)
betweenness(g)
edge.betweenness(g)

[Package igraph version 0.2.1 Index]