igraph-help
[Top][All Lists]
Advanced

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

[igraph] igraph - get shortest paths and iterators


From: Blumentrath, Stefan
Subject: [igraph] igraph - get shortest paths and iterators
Date: Fri, 6 Jan 2012 10:44:54 +0000

Dear all,

 

I am using the igraph-package in R quite often for network analysis, and I do love it!

In a project I am using it on a network with more than 5500 conservation areas (vertices) and up to 1.6 mio edges. Igraph works very well for that network-size too.

 

There is just one exeption:

“edge.betweenness” does not account for edge-weights. This is why I wrote a workaround combining “get.shortest.paths”- and the iterator-function (“E(g, path=x)”, to get the edges along the shortest paths).

Unfortunately, the “get.shortest.paths”-function returns always a list object (even if called with a single pair of nodes), which the iterator function cannot interpret (and which is why I used mclapply in my workaround). For smaller networks (mc)lapply did the job good enough. But having 5500x5500 possible combinations of vertices makes even mclapply with 15 cores impossible.

 

My questions are:

Is there any chance to make “edge.betweenness” accounting for edge-weights?

Or is it possible to add (for example) a mode to “get.shortest.path” which makes it returning edge-ids instead of vertex-ids?

Or is it possible to generate a function “get.shortest.path” (returning a vector of vertex-ids for a single shortest path between a pair of vertices (and not a list)? This would make the output directly usable in the iterator-function…

 

Any help or hints is very much appreciated!

 

Many thanks!

 

Best regards,

Stefan

 


reply via email to

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