grinpy.invariants.disparity.irregularity

grinpy.invariants.disparity.irregularity(G)

Return the irregularity measure of the graph.

The irregularity of an n-vertex graph is defined as:

\[\]

rac{2}{n(n+1)}sum_{i=0}^{n-i}(n-i)f(i)

where f(i) is the frequency of i in the closed disparity sequence.

G : graph
A Networkx graph.
irregularity : float
The irregularity of the graph.

k_disparity