On Wed, Aug 15, 2012 at 4:10 PM, Sam Steingold <[email protected]> wrote: [...] > Also, this takes forever and consumes almost all 8GB RAM. > It has been running on > > --8<---------------cut here---------------start------------->8--- > IGRAPH DNW- 18590 6734992 -- > + attr: name (v/c), count (v/n), weight (e/n) > --8<---------------cut here---------------end--------------->8--- > > for an hour and a half now. [...]
g <- erdos.renyi.game(18590, 6734992, type="gnm") E(g)$weight <- runif(ecount(g)) and then al <- get.adjedgelist(g) w <- E(g)$weight tmp <- sapply(al, function(e) mean(w[e])) is fairly quick: > system.time(tmp <- sapply(al, function(e) mean(w[e]))) user system elapsed 1.353 0.069 1.458 Gabor -- Gabor Csardi <[email protected]> MTA KFKI RMKI _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
