igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] shortest path calculation


From: Gábor Csárdi
Subject: Re: [igraph] shortest path calculation
Date: Fri, 30 Jan 2009 17:33:52 +0100

Impossible to tell for sure without knowing what is in the file "b".
My guess is that all edges have weight zero, but can be something
else.

G.

On Fri, Jan 30, 2009 at 5:30 PM, Thiago M. Venancio
<address@hidden> wrote:
> Hi,
>
> I am experiencing some problems in calculating the shortest path length
> matrix. Note that it is giving zeroes for all the cells, even when vertices
> are connected.
> I noticed the V() function return indexes in the indexes and in my graph
> return quoted numbers. Explicitly telling the indexes also does not solve
> the problem.
> The example in the documentation is working. I do not know what is the
> problem in my code.
> Below is a toy example.
>
> Thanks.
>
> Thiago
>
> test = read.graph("b", format="ncol", names=T)
>> test
> Vertices: 4
> Edges: 3
> Directed: FALSE
> Edges:
>
> [0] a -- b
> [1] b -- c
> [2] c -- d
>
>> shortest.paths(test)
>      [,1] [,2] [,3] [,4]
> [1,]    0    0    0    0
> [2,]    0    0    0    0
> [3,]    0    0    0    0
> [4,]    0    0    0    0
>
>> shortest.paths(test,v=1:2)
>      [,1] [,2] [,3] [,4]
> [1,]    0    0    0    0
> [2,]    0    0    0    0
>
>
>
> _______________________________________________
> 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]