(graph)
return e / (3 * (v - 2))
Calculates gamma index of a graph.
Calculates gamma index of a graph.
Calculates gamma index of a graph .
def _gamma(graph):
    """
    Calculates gamma index of a graph.
    """
    e = graph.number_of_edges()
    v = graph.number_of_nodes()
    if v == 2:
        return np.nan
    return e / (3 * (v - 2))
def _gamma ( graph ) : e = graph . number_of_edges ( ) v = graph . number_of_nodes ( ) if v == 2 : return np . nan return e / ( 3 * ( v - 2 ) )