Return the average degree of G.
The average degree of a graph is the average of the degrees of all nodes in the graph.
Parameters: G (NetworkX graph) – An undirected graph. Returns: The average degree of the graph. Return type: float
>>> G = nx.star_graph(3) # Star on 4 nodes >>> nx.average_degree(G) 1.5