igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Distance()


From: Gábor Csárdi
Subject: Re: [igraph] Distance()
Date: Wed, 3 Dec 2008 12:59:32 +0100

Marco, calculating the shortest path to a single vertex, or to all
vertices takes about the same time, so you don't lose much by doing
the latter.

Nevertheless, (if I remember well) in the next major igraph version
(0.6) we will have a shortest_paths version that can be restricted to
a certain subset of target vertices.

Best,
Gabor

On Wed, Dec 3, 2008 at 12:39 PM, Marco <address@hidden> wrote:
> Hi all,
>
> i'd like to define a function called distance(), which, given 2
> vertices in a graph, returns the distance of those vertices, defined
> as the minimum length path between the two vertices.
>
> Is there a function that already does that?
>
> If not, which way should i take? get_all_shortest_path doesn't let me
> decide the endvertex of the path, and bfsiter iters thru all vertices
> too. I'd prefer to save time, and just calculate the paths between the
> two vertices and then take the min().
>
> How could I implement such a thing in an "efficient" way?
>
> Ideas and comments, welcomed!
>
> Thanks in advance,
>
> marco
>
>
> --
>
> Quando sei una human pignata
> e la pazzo jacket si è accorciata
> e non ti puoi liberare
> dai colpi di legno e di bastone
> dai petardi sul groppone
>
> Vinicio Capossela
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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