igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] : compare membership


From: Gábor Csárdi
Subject: Re: [igraph] : compare membership
Date: Tue, 9 Dec 2014 14:03:20 -0500

This is not a reproducible example, unfortunately. Here is how to write one:
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Gabor

On Mon, Dec 8, 2014 at 11:37 PM, patricia <address@hidden> wrote:
> follows function :
>
> EdgesBetweenClusters <- function(graph, numTrials, numberVertices)
> {
>   require(igraph);
>   communities <- infomap.community(graph, v.weights = NULL, modularity =
> TRUE, nb.trials = numTrials);
>
>   for(i in 1:numberVertices-1)
>   {
>     for(j in i+1:numberVertices)
>     {
>       if(membership(communities)[i] == membership(communities)[j])
>       {
>         edgesintracluster <- edgesintracluster + 1;
>       }
>       else
>       {
>         edgesintercluster <- edgesintercluster + 1;
>       }
>     }
>   }
>   return(edgesintercluster);
> }
>
> => attached the following file in xml format
>
> _______________________________________________
> 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]