igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Search for k-cliques


From: Gabor Csardi
Subject: Re: [igraph] Search for k-cliques
Date: Fri, 16 May 2008 16:37:58 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Look at the function 'igraph_transitivity_local_undirected2' in 
the file 'structural_properties.c'. There is a part like this:

          if (neis[nei2] == node+1) {
            VECTOR(triangles) [ nei2index-1 ] += 1;
            VECTOR(triangles) [ neiindex-1 ] += 1;
            VECTOR(triangles) [ nodeindex-1 ] += 1;
          }

That's where a triangle is found. I don't really have time now
to check the code, i think the three vertices in the triangle are 
nei2index-1, neiindex-1 and nodeindex-1. You need to store that somewhere 
and then return the result, plus write an R interface to the function 
if you want to get the result from R. I'm not saying that it is 
trivial....

G.

On Fri, May 16, 2008 at 04:24:53PM +0200, Lacón Grelos wrote:
> HI Gabor.
> Thanks for your answer.
> I will need the list, actually. Which is the kind of conding you are  
> thinking about?
> Best
> 
> El 16/05/2008, a las 16:17, Gabor Csardi escribió:
> 
> >Hi, you need the list of triangles? Or just the number of them?
> >In the latter case do a motif detection. The former is more
> >difficult, i'm afraid that you need to modify some C code for
> >that.
> >
> >G.
> >
> >On Fri, May 16, 2008 at 03:44:38PM +0200, Lacón Grelos wrote:
> >>    Hi i-graphers
> >>    I am trying to recover all triangles (3-cliques) in my graph (200000
> >>nodes and 1.2 Million links) with the igraph function "cliques".
> >>Unfortunately computation time is huge (>1day !). I was wondering
> >>wether this is normal and if there is any other faster way to get the
> >>k-cliques in my graph (with k small).
> >>    Thanks in advance.
> >>    Best
> >>
> >>
> >>
> >>_______________________________________________
> >>igraph-help mailing list
> >>address@hidden
> >>http://lists.nongnu.org/mailman/listinfo/igraph-help
> >
> >-- 
> >Csardi Gabor <address@hidden>    UNIL DGM
> >
> >
> >_______________________________________________
> >igraph-help mailing list
> >address@hidden
> >http://lists.nongnu.org/mailman/listinfo/igraph-help
> 
> 
> 
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help

-- 
Csardi Gabor <address@hidden>    UNIL DGM




reply via email to

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