igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Joint Membership in Cohesive.blocks


From: Gábor Csárdi
Subject: Re: [igraph] Joint Membership in Cohesive.blocks
Date: Sat, 15 Nov 2014 14:00:12 -0500

Nice! Thanks for sharing!

On Sat, Nov 15, 2014 at 1:17 PM, Richard Benton
<address@hidden> wrote:
[...]
> #loop over the matrix#
> for (b in seq(from=1, to=length(bl))){
> for (i in seq(from=1, to=18)){
>   for (j in seq(from=1, to=18)){
>     if(i%in%bl[[b]] & j%in%bl[[b]]) cohesionmat[i,j]<-co[b] else next

Here you also need to check that cohesionmat[i,j] is smaller than
co[b]. It might happen that a block with smaller cohesion is listed
later. (I am actually not completely sure, because I forgot how I
implemented it, but it is better to be on the defensive side, anyway.)

Gabor

>     }
>   }
> }
>
> _______________________________________________
> 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]