grinpy.functions.degree.max_degree

grinpy.functions.degree.max_degree(G)

Return the maximum degree of G.

The maximum degree of a graph is the largest degree of any node in the graph.

Parameters:G (NetworkX graph) – An undirected graph.
Returns:The maximum degree of the graph.
Return type:int

Examples

>>> G = nx.path_graph(3) # Path on 3 nodes
>>> nx.min_degree(G)
2