Description Usage Arguments Details Value References Examples
Adapted Based on characterisic âth length Intergates spatial distance. Normalized by ideal efficiency, a situation in whihc all nodes are directly connected Unlike average distance, this metric is correctly defined even if the graph is not connected.
1 | efficiencyLM(g)
|
g |
An igraph object. |
For aggregated graphs, road distance cannot be used. Thus, its uses
euclidian distance based on x
and y
vertices attributes.
A numeric between 0 and 1.
Latora, V., & Marchiori, M. (2001). Efficient Behavior of Small-World Networks. Physical Review Letters, 87(19), 198701. https://doi.org/10.1103/PhysRevLett.87.198701
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(igraph)
set.seed(123)
## Generate 100 random spatial networks with increasing density
genGraph = function(p) {
g = erdos.renyi.game(10, p)
V(g)$x = runif(10)
V(g)$y = runif(10)
g
}
x = seq(0, 1, by=0.01)
lg = lapply(x, genGraph)
## Efficiency increases with density
y = sapply(lg, efficiencyLM)
plot(x, y)
## Local efficiency is average efficiency of local subgraphs
## dg = decompose.graph(g)
## mean(sapply(dg, efficiencyLM))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.