dynetworkx.ImpulseGraph.degree¶
-
ImpulseGraph.
degree
(node=None, begin=None, end=None, delta=False)¶ Return the degree of a specified node between time begin and end.
Parameters: - node (Nodes can be, for example, strings or numbers.) – Nodes must be hashable (and not None) Python objects.
- begin (int or float, optional (default= beginning of the entire impulse graph)) – Inclusive beginning time of the edge appearing in the impulse graph.
- end (int or float, optional (default= end of the entire impulse graph)) – Non-inclusive ending time of the edge appearing in the impulse graph.
Returns: Return type: Integer value of degree of specified node.
Examples
>>> G = ImpulseGraph() >>> G.add_edge(1, 2, 3) >>> G.add_edge(2, 3, 8) >>> G.degree(2) 2 >>> G.degree(2,2) 2 >>> G.degree(2,end=8) 1 >>> G.mean_degree() 1.33333 >>> G.degree(2,delta=True) [(8, 1), (3, 1)]