[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] connected graph returns shortest.paths with inf
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] connected graph returns shortest.paths with inf |
Date: |
Wed, 1 Sep 2010 10:14:28 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Dear Martin,
> nodes <- V(g);
> y<-lapply(nodes,function(x){shortest.paths(g,x)})
>
> max(y[[1]]) returns Inf, and also sum(y[[1]]==Inf), meaning that
> there are disconnected nodes.
>
> How could that happen?
First I was thinking that is.connected() in R may be checking for strong
connectedness and your graph may be only weakly connected (meaning that
there is a path from A to B but no path from B to A); however, it turns
out not to be the case (at least not in 0.6). I'm not that familiar with
the R interface, but if you can send me a small(ish) example graph on
which I could reproduce the problem, I'll take a look.
Cheers,
Tamas
- Re: [igraph] connected graph returns shortest.paths with inf,
Tamas Nepusz <=