[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] enumerating triads of certain type?

From: baidao
Subject: Re: [igraph] enumerating triads of certain type?
Date: Wed, 11 Apr 2012 05:40:03 +0800

That helps. Thank you!



On Tue, Apr 10, 2012 at 2:56 AM, Tamás Nepusz <address@hidden> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help

reply via email to

[Prev in Thread] Current Thread [Next in Thread]