betweenness(graph, v=V(graph), directed = TRUE, weights = NULL,
nobigint = TRUE, normalized = FALSE)
edge.betweenness(graph, e=E(graph), directed = TRUE, weights = NULL)
betweenness.estimate(graph, vids = V(graph), directed = TRUE, cutoff,
weights = NULL, nobigint = TRUE)
edge.betweenness.estimate(graph, e=E(graph),
directed = TRUE, cutoff, weights = NULL)weight edge
attribute, then this is used by default.TRUE
(the default), then big integers are not usedTRUE, then the results are normalized according to
$$B^n=\frac{2B}{n^2-3n+2}$$, where
$B^n$ is the normalized, $B$ the raw betweenness, and
$n$ is the number of vv for betweenness. A numeric vector with the edge betweenness score for each edge in
e for edge.betweenness.
betweenness.estimate returns the estimated betweenness scores
for vertices in vids, edge.betweenness.estimate
the estimated edge betweenness score for all edges; both in
a numeric vector.
$$\sum_{i\ne j, i\ne v, j\ne v} g_{ivj}/g_{ij}$$ The edge betweenness of edge $e$ is defined by
$$\sum_{i\ne j} g{iej}/g_{ij}.$$
betweenness calculates vertex betweenness,
edge.betweenness calculates edge.betweenness.
betweenness.estimate only considers paths of length
cutoff or smaller, this can be run for larger graphs, as the
running time is not quadratic (if cutoff is small). If
cutoff is zero or negative then the function calculates the
exact betweenness scores.
edge.betweenness.estimate is similar, but for edges.
For calculating the betweenness a similar algorithm to the one proposed by Brandes (see References) is used.
Ulrik Brandes, A Faster Algorithm for Betweenness Centrality. Journal of Mathematical Sociology 25(2):163-177, 2001.
closeness, degreeg <- random.graph.game(10, 3/10)
betweenness(g)
edge.betweenness(g)Run the code above in your browser using DataLab