That helps. Thank you!


Best,

baidao



On Tue, Apr 10, 2012 at 2:56 AM, Tamás Nepusz <[email protected]> wrote:
>> By using triad.census() I could get the numbers of 16 triads types.
>> But how to enumerate all triads of a certain type? e.g., I want igraph
>> to list all the vertexes of the triad type 'A->B->C'.
>
> For the most general case, I would say that you should try 
> graph.get.subisomorphisms.vf2, which calculates all isomorphic mappings 
> between a graph and all the subgraphs of another graph. I.e., you construct 
> your desired triad type as a small graph "template" and then you use 
> graph.get.subisomorphisms.vf2 to find all the possible ways to match this 
> small graph "template" to your original graph.
>
> However, if you are looking for all the A -> B -> C triads, then there is a 
> much easier way to do this. For each vertex B in the graph, get its 
> in-neighbors and out-neighbors. Any combination of an in-neighbor (A), an 
> out-neighbor (C) and B itself is then a possible A --> B --> C triad.
>
> Best,
> Tamas
>
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to