cppRouting icon indicating copy to clipboard operation
cppRouting copied to clipboard

change direction of get_path_pair output

Open ambuehll opened this issue 4 years ago • 1 comments

Hi,

first of all, thanks for the awesome package. Super fast implementations. I came accross a mileading implementation of the get_path_pair function. It seems as if the visited nodes are listed backwards. See:

graph<-data.frame(from=c(0,1,2,3,4,2),
                  to=c(1,2,3,0,2,4),
                  weight=c(1,1,1,1,1,1))


cpp_graph<-makegraph(graph,directed=TRUE)
get_path_pair(cpp_graph,from="0",to="3")

output:

$`0_3`
[1] "3" "2" "1" "0"

with graph example from: https://stackoverflow.com/questions/60784024/djikstra-method-using-cpprouting-package-in-r

I think a note in the user manual would be helpful.

Thanks!

Lukas

ambuehll avatar Nov 25 '20 15:11 ambuehll

Hi,

Thanks for reporting this. It will be fixed in the next version.

Vincent

vlarmet avatar Nov 26 '20 15:11 vlarmet

Hi,

It's fixed. Please wait a few days until cppRouting 3.1 is on CRAN.

Vincent

vlarmet avatar Nov 30 '22 13:11 vlarmet