Skip to content

Commit

Permalink
fix convex implementation #223 to close polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed May 17, 2024
1 parent 74cc11b commit ea6b87c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 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.3.0.024
Version: 0.3.0.025
Authors@R: c(
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")),
person("Andreas", "Petutschnig", role = "aut"),
Expand Down
6 changes: 5 additions & 1 deletion R/iso.R
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,11 @@ dmat_to_pts <- function (d, from, v, dlim, convex = FALSE) {
if (convex) {
pts <- lapply (pts, function (pt_from) {
lapply (pt_from, function (pt_dlim) {
pt_dlim [grDevices::chull (pt_dlim [, c ("x", "y")]), ]
h <- grDevices::chull (pt_dlim [, c ("x", "y")])
if (length (h) > 1) {
h <- c (h, h [1])
}
pt_dlim [h, ]
})
})
}
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/UrbanAnalyst/dodgr",
"issueTracker": "https://github.com/UrbanAnalyst/dodgr/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.3.0.024",
"version": "0.3.0.025",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit ea6b87c

Please sign in to comment.