grinpy.functions.degree.closed_neighborhood_degree_list¶
-
grinpy.functions.degree.
closed_neighborhood_degree_list
(G, nbunch)¶ Return a list of the unique degrees of all nodes in the closed neighborhood of the nodes in nbunch.
- G : graph
- A NetworkX graph.
nbunch : a single node or iterable container of nodes
- degreeList : list
- A list of the degrees of all nodes in the closed neighborhood of the nodes in nbunch.
closed_neighborhood, neighborhood_degree_list
>>> import grinpy as gp >>> G = gp.path_graph(3) # Path on 3 nodes >>> gp.closed_neighborhood_degree_list(G, 1) [1, 2, 2]