grinpy.invariants.disparity.closed_k_disparity¶
-
grinpy.invariants.disparity.
closed_k_disparity
(G, k)¶ Return the closed k-disparity of the graph.
The closed k-disparity of a graph is defined as:
\[\]rac{2}{k(k+1)}sum_{i=0}^{k-1}(k-i)d_i
where k is a positive integer and d_i is the frequency of i in the closed disparity sequence.
- G : graph
- A Networkx graph.
- closedKDisparity : float
- The closed k-disparity of the graph.
k_disparity