Sorry for the delay! Answers below. On Tue, Apr 3, 2012 at 11:16 AM, Sam Steingold <[email protected]> wrote: >> * Sam Steingold <fqf-zKKw517/[email protected]> [2012-03-23 14:39:02 >> -0400]: >> >> given a digraph, how do I find all paths of given length? > > neighborhood() appears to be useful, except that it returned really a > neighborhood, i.e., the vertexes reachable by <= N steps. > What if I want the vertexes reachable in _EXACTLY_ N steps?
You mean shortest paths here? If yes, then you can calculate shortest.paths() from a given starting vertex and see which vertices are n steps away. >> what if all the edges in the path must have the same attribute? Then remove the rest of the edges from the graph first. Not surprisingly this is exactly your next question. :) > How do I create a subgraph with edges of a fixes specified attribute? Select the edges and supply them to delete.edges. E.g. removing edges under a weight threshold: delete.edges( g, E(g)[ weight < 0.5 ] ) G. [...] _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
