average_degree#

average_degree(graph)#

The average (undirected) degree of all nodes in the graph.

Note that this treats the graph as simple and undirected and is equal to twice the number of undirected edges divided by the number of nodes.

Parameters:

graph (GraphView) – a Raphtory graph

Returns:

the average degree of the nodes in the graph

Return type:

float