aryagraph.algorithms.structure.density#

aryagraph.algorithms.structure.density(g: Any) → float[source]#

Edges present over edges possible: 2m / n(n-1) (undirected) or m / n(n-1).

Self-loops count in m, as in networkx, so the value can exceed 1.