Skip to main content
`Ctrl`+`K`

# global_efficiency

global_efficiency(G)

  Returns the average global efficiency of the graph.

  The efficiency of a pair of nodes in a graph is the multiplicative inverse of the shortest path distance between the nodes. The average global efficiency of a graph is the average efficiency of all pairs of nodes [1].

  Parameters:
    G `networkx.Graph`

      An undirected graph for which to compute the average global efficiency.

  Returns:
    float

      The average global efficiency of the graph.

  See also

  `local_efficiency`

  Notes

  Edge weights are ignored when computing the shortest path distances.

  References

  [1]

  Latora, Vito, and Massimo Marchiori. “Efficient behavior of small-world networks.” Physical Review Letters 87.19 (2001): 198701. <https://doi.org/10.1103/PhysRevLett.87.198701>

  Examples

      >>> G = nx.Graph([(0, 1), (0, 2), (0, 3), (1, 2), (1, 3)])
      >>> round(nx.global_efficiency(G), 12)
      0.916666666667