all shortest paths not working in version 6

Asked by omar

Hi
I installed igraph_nightly_0.6-2244-20101203.tar.gz on mac I installed (libxml2 and GLPK).
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-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

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.adjacency(x, mode="undirected",weighted=TRUE, diag=FALSE )
> 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.shortest.paths(g, 1,1:5)
$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.shortest.paths(g, 2,1:5)

R quit unexpectedly!

Question information

Language:
English Edit question
Status:
Solved
For:
igraph Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tamás Nepusz (ntamas) said :
#1

This should be a bug report and not a question. I've created a bug report for you here: https://bugs.launchpad.net/bugs/688884

Revision history for this message
Tamás Nepusz (ntamas) said :
#2

Fixed in the latest revision (#2274).