dynetx.DynGraph.neighbors_iter¶
- DynGraph.neighbors_iter(n, t=None)¶
Return an iterator over all neighbors of node n at time t.
Parameters¶
- nnode
A node in the graph
- tsnapshot id (default=None)
If None will be returned an iterator over the neighbors of the node on the flattened graph.
Examples¶
>>> import dynetx as dn >>> G = dn.DynGraph() >>> G.add_path([0,1,2,3], t=0) >>> [n for n in G.neighbors_iter(0, t=0)] [1]