Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/structural.properties.R
The vertex and edge betweenness are (roughly) defined by the number of geodesics (shortest paths) going through a vertex or an edge.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 
graph 
The graph to analyze. 
vids 
The vertices for which the vertex betweenness estimation will be calculated. 
directed 
Logical, whether directed paths should be considered while determining the shortest paths. 
cutoff 
The maximum path length to consider when calculating the betweenness. If zero or negative then there is no such limit. 
weights 
Optional positive weight vector for calculating weighted
betweenness. If the graph has a 
nobigint 
Logical scalar, whether to use big integers during the
calculation. This is only required for latticelike graphs that have very
many shortest paths between a pair of vertices. If 
v 
The vertices for which the vertex betweenness will be calculated. 
normalized 
Logical scalar, whether to normalize the betweenness
scores. If Bnorm=2*B/(n*n3*n+2) , where Bnorm is the normalized, B the raw betweenness, and n is the number of vertices in the graph. 
e 
The edges for which the edge betweenness will be calculated. 
The vertex betweenness of vertex \code{v} is defined by
sum( g_ivj / g_ij, i!=j,i!=v,j!=v)
The edge betweenness of edge \code{e} is defined by
sum( g_iej / g_ij, i!=j).
betweenness
calculates vertex betweenness, edge_betweenness
calculates edge betweenness.
estimate_betweenness
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.
estimate_edge_betweenness
is similar, but for edges.
For calculating the betweenness a similar algorithm to the one proposed by Brandes (see References) is used.
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
.
estimate_betweenness
returns the estimated betweenness scores for
vertices in vids
, estimate_edge_betweenness
the estimated edge
betweenness score for all edges; both in a numeric vector.
edge_betweenness
might give false values for graphs with
multiple edges.
Gabor Csardi csardi.gabor@gmail.com
Freeman, L.C. (1979). Centrality in Social Networks I: Conceptual Clarification. Social Networks, 1, 215239.
Ulrik Brandes, A Faster Algorithm for Betweenness Centrality. Journal of Mathematical Sociology 25(2):163177, 2001.
1 2 3  g < sample_gnp(10, 3/10)
betweenness(g)
edge_betweenness(g)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.