igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] a problem with simplify()


From: Simone Gabbriellini
Subject: Re: [igraph] a problem with simplify()
Date: Thu, 21 Oct 2010 19:21:18 +0200

Thanks Tamas, Gabor

actually, I should have the 1-based vertex indexing. BTW, the edge indexing is 
0-based, right?

> V(g)
Vertex sequence:
  [1] "user138" "user300" "user301" "user290" "user93"  "user145" "user223" 
"user96"  "user148" "user154"
 [11] "user152" "user467" "user104" "user317" "user111" "user143" "user292" 
"user91"  "user31"  "user90" 


> E(g)
Edge sequence:
                        
[0]   user85  -> user85 
[1]   user33  -> user33 


best,
simone

Il giorno 21/ott/2010, alle ore 19.06, Tamas Nepusz ha scritto:

>> Definitely, because your code does not take into account that edges are 
>> reindexed after every deletion. I'd go for delete.edges(g, seq(0, 
>> ecount(g)-1)[is.loop(g)])
> Or, even better: delete.edges(g, which(is.loop(g))-1) if your igraph version 
> uses 0-based indexing. Note that  the R interface of igraph 0.6 has recently 
> switched to 1-based indexing, so if you installed igraph 0.6 in the last few 
> days, you don't have to subtract 1.
> 
> -- 
> T.
> 
> 
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

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