I'm wondering what the most efficient/idiomatic way to get all vertices
reachable from a given vertex.
Could I do graph.neighbourhood(vertex, float('inf')) ?
(The 'order' param to neighbourhood actually isn't documented here:
http://igraph.sourceforge.net/doc/python/igraph.GraphBase-class.html#neighborhoodso
I'm not sure if there's an issue with giving it infinite order - e.g.
if
it might loop infinitely in the case of a cycle.)
Would it be better to do something like...
for v in graph.vs:
if graph.vertex_connectivity(v, vertex, neighbours='infinity') == 0:
yield v
(This seems inefficient)
Any thoughts on the best way to do this?
Thanks,
Colin
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help