@not_implemented_for('directed')
def global_efficiency(G):
 n = len(G)
 denom = (n * (n - 1))
 return (sum((efficiency(G, u, v) for (u, v) in permutations(G, 2))) / denom)

@ not_implemented_for ( 'directed' ) def global_efficiency ( G ) : n = len ( G ) denom = ( n * ( n - 1 ) ) return ( sum ( ( efficiency ( G , u , v ) for ( u , v ) in permutations ( G , 2 ) ) ) / denom )
returns the average global efficiency of the graph .