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:


where k is a positive integer and d_i is the i-th element in the closed disparity sequence, ordered in weakly decreasing order.

Parameters:G (NetworkX graph) – An undirected graph.
Returns:The closed k-disparity of the graph.
Return type:float

See also