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: Tamas Nepusz
Subject: Re: [igraph] a problem with simplify()
Date: Thu, 21 Oct 2010 18:06:44 +0100

> 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.




reply via email to

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