Skip to content

Commit

Permalink
switch on distances param in match_pts_to_graph for #103
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Sep 4, 2022
1 parent 42237a0 commit cb4ab14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dodgr
Title: Distances on Directed Graphs
Version: 0.2.15.011
Version: 0.2.15.012
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre")),
person("Andreas", "Petutschnig", role = "aut"),
Expand Down
13 changes: 8 additions & 5 deletions R/match-points.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,14 @@ match_pts_to_graph <- function (graph, xy,
# rcpp_points_index is 0-indexed, so ...
graph_index <- as.integer (res [index]) + 1L

# ret <- data.frame (
# index = graph_index,
# d_signed = signed_intersection_dists (graph, xy, res)
# )
ret <- graph_index
if (distances) {
ret <- data.frame (
index = graph_index,
d_signed = signed_intersection_dists (graph, xy, res)
)
} else {
ret <- graph_index
}

return (ret)
}
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"codeRepository": "https://github.com/ATFutures/dodgr",
"issueTracker": "https://github.com/ATFutures/dodgr/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.2.15.011",
"version": "0.2.15.012",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit cb4ab14

Please sign in to comment.