edgegraph.traversal.helpers.neighbors

Contents

edgegraph.traversal.helpers.neighbors#

edgegraph.traversal.helpers.neighbors(vert, direction_sensitive=0, unknown_handling=2, filterfunc=None)#

Identify the neighbors of a given vertex (non-generator).

This function checks the edges associated with the given vertex, identifies the vertices on the other end of those edges, and returns them. It respects edge directionality if/when necessary, and can handle arbitrary edge types given they are subclasses of either DirectedEdge or UnDirectedEdge.

See also

Please refer to the documentation of ineighbors()! This function simply wraps that one, only forcing full expansion to a list before returning. All parameters are exactly the same and passed through without alteration.

Returns:

A list of Vertex objects representing neighbors of the specified vertex.

Return type:

list[Vertex]