efficiencyLM: Latora and Marchiori efficiency

Description Usage Arguments Details Value References Examples

View source: R/efficiency.R

Description

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.

Usage

1

Arguments

g

An igraph object.

Details

For aggregated graphs, road distance cannot be used. Thus, its uses euclidian distance based on x and y vertices attributes.

Value

A numeric between 0 and 1.

References

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

Examples

 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))

MiloMonnier/supplynet documentation built on Feb. 16, 2021, 8:03 p.m.