dynetx.classes.function.all_neighbors

dynetx.classes.function.all_neighbors(graph, node, t=None)

Returns all of the neighbors of a node in the graph at time t.

If the graph is directed returns predecessors as well as successors.

Parameters

graphDyNetx graph

Graph to find neighbors.

nodenode

The node whose neighbors will be returned.

tsnapshot id (default=None)

If None the neighbors are identified on the flattened graph.

Returns

neighborsiterator

Iterator of neighbors