Description Usage Arguments Examples
Functions to compute the information centrality of a vertex (node) and network respectively. Includes a network efficiency measure to compute as a metric for information centrality. Uses graphs functions as an extension of igraph
.
1 2 3 4 5 | network.efficiency(graph)
info.centrality.vertex(graph, net = NULL, verbose = F)
info.centrality.network(graph, net = network.efficiency(graph), verbose = F)
|
graph |
An |
net |
Numeric. Efficiency of the Network without any nodes removed. Defaults to computing for Graph given as input, can be given as a numeric if computed in advance to save run time. |
verbose |
Logical. Whether computing information centrality of each node prints to monitor progress of a potentially long run-time. Defaults to FALSE. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #generate example graphs
library("igraph")
g1 <- make_ring(10)
g2 <- make_star(10)
#show network paths
distances(g1)
shortest_paths(g1, 5)
#compute efficiency of full graphs
network.efficiency(g1)
network.efficiency(g2)
#compute information centrality (relative efficency when removed) for each node
info.centrality.vertex(g1)
info.centrality.vertex(g2)
#compute total information centrality for a network
info.centrality.network(g1)
info.centrality.network(g2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.