[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] best path in a undirected graph with weights
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] best path in a undirected graph with weights |
Date: |
Mon, 27 Apr 2009 08:29:02 +0200 |
Hi,
On Mon, Apr 27, 2009 at 1:56 AM, Romildo Martins
<address@hidden> wrote:
> Hi,
>
> Is it possible to choose the best path in a undirected graph with weights?
>
> For example
>
>> g<- graph(c(0,1,1,2,2,0), directed=FALSE)
>> E(g)$weights<-c(1,1,5)
it should be 'weight' and not 'weights'.
G.
>> get.shortest.paths(g,0,2)
> [[1]]
> [1] 0 2
>
> In this case, the best choice is 0,1 -> 1,2
>
> Thanks!
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
--
Gabor Csardi <address@hidden> UNIL DGM