Return the irregularity measure of the graph.
The irregularity of an n-vertex graph is defined as:\[\]
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.