On Wed, 11 Apr 2012, Tam??s Nepusz wrote:
Just run shortest.paths as well, this gives you the distance matrix.
If your graph is very large and the distance matrix does not fit into
memory, you should iterate over the paths, get the weights of the edges
in the path with E(g, path=list.of.vertices)$weight and then sum them up
using sum(). E.g.:
I tried:
g <- erad.graph("file", format="ncol", directed=TRUE, weight=TRUE)
l <- get.shortest.paths(g, 0, to=V(g), mode=c("out"))
E(g, path=l[2])$weight
(list) object can't be coerced to type 'double' # the error
-ishwar_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help