all shortest paths not working in 0.6
Bug Description
Hi
I installed igraph_
I want to compute all the shortest path, it worked only when the from set to 1, but when I tried to compute the shortest paths from any vertex , R quit unexpectedly!
Here I provide an example,
> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: x86_64-
locale:
[1] en_US.UTF-
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] igraph_0.6
loaded via a namespace (and not attached):
[1] tools_2.12.0
x
[,1] [,2] [,3] [,4] [,5]
[1,] 0 2 8 4 7
[2,] 2 0 5 2 5
[3,] 8 5 0 4 7
[4,] 4 2 4 0 5
[5,] 7 5 7 5 0
g=graph.
> g
IGRAPH U-W- 5 10 --
+ attr: weight (e/n)
+ edges:
1 -- 2 3 4 5 2 -- 1 3 4 5 3 -- 1 2 4 5 4 -- 1 2 3 5 5 -- 1 2 3 4
> shortest.paths(g)
[,1] [,2] [,3] [,4] [,5]
[1,] 0 2 7 4 7
[2,] 2 0 5 2 5
[3,] 7 5 0 4 7
[4,] 4 2 4 0 5
[5,] 7 5 7 5 0
> get.all.
$res
$res[[1]]
[1] 1
$res[[2]]
[1] 1 2
$res[[3]]
[1] 1 2 3
$res[[4]]
[1] 1 2 4
$res[[5]]
[1] 1 4
$res[[6]]
[1] 1 5
$res[[7]]
[1] 1 2 5
$nrgeo
[1] 1 1 1 2 2
get.all.
R quit unexpectedly!
It also fails if 'to' is igraph_vss_all if the source vertex is 1 in the example and not zero.
The development of igraph has moved to github, so please do not comment on this bug here. You are of course welcome to comment on github, here:
https:/
This is probably not R specific, it happens with the C interface as well, a sample program is attached.
Interestingly, it only happens if 'to' is a vector of vertices, it does not happen if it is 'igraph_vss_all'.