wiener_index_centrality: Wiener Index Centrality
Description
This function computes Wiener Index Centrality.
The Wiener index computes the sum of the all shortest paths
between a node v and all other related nodes in the graph.
Fundementally, it's like to the closeness but here since the reciprocal is not computed, the value has the opposite meaning.
Usage
wiener_index_centrality(
x,
vids = V(x),
mode = c("all", "out", "in"),
weights = NULL
)
Arguments
x
An igraph or a network object
vids
Nodes to be considered in the calculation
mode
A Character value, indicating whether the shortest paths "in" or "out" of the nodes in the directed graphs should be considered. For undirected graphs we use "all".
weights
Numeric vector indicating weights of the edges
Value
a vector including centrality values for each node
References
Scardoni, G. and Carlo Laudanna, C.B.M.C., 2011. Network centralities for Cytoscape. University of Verona.
Examples
Run this code# NOT RUN {
data(zachary)
wiener_index_centrality(zachary)
# }
Run the code above in your browser using DataLab