igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] alternate diameter paths


From: Tamas Nepusz
Subject: Re: [igraph] alternate diameter paths
Date: Thu, 15 May 2008 17:14:01 +0200

Dear Alisa,

If you can afford calculating all shortest paths in your network, then try get.all.shortest.paths:

get.all.shortest.paths(graph, from, to = V(graph), mode = c("all", "out", "in")) For get.all.shortest.paths a list is returned, each list element contains a shortest path from from to a vertex in to. The shortest paths to the same vertex are collected into consecutive elements of the list. get.all.shortest.paths applies only for a single vertex, but of course you can run it for all vertices in a for loop. Of course you'll have to filter the list returned from get.all.shortest.paths based on their length.

--
Tamas





reply via email to

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