> I'm wondering what the most efficient/idiomatic way to get all vertices > reachable from a given vertex. reachable_vertices = list(graph.bfsiter(source))
This will give you a list of Vertex objects. If you only need the indices, do this: reachable_vertex_indices = [v.index for v in graph.bfsiter(source)] As a side-effect, the list will be sorted in increasing order of distance from the source vertex. -- T. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
