Look at the function graph.neighborhood(), I think that does exactly what you want.
Gabot On Tue, Dec 4, 2012 at 8:47 AM, Ross KK Leung <[email protected]> wrote: > Has igraph any function to retrieve the nodes connected to a specified > vertex recursively? For example, a root is connected to 3 leaves, and then > these 3 leaves are each connected to 2, 1, 4 leaves respectively, and then > that 2, 1, 4 leaves are used again to search. So this should be something > like depth-first search but I’m unable to identify how to get back the > edgelist for this search and the layer (or depth) that I can specify to > search.**** > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > > -- Gabor Csardi <[email protected]> MTA KFKI RMKI
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
