Skip to content

Commit 27a50c8

Browse files
committed
compound junctions in dodgr_dists_categorical for #190
1 parent a82ff41 commit 27a50c8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dodgr
22
Title: Distances on Directed Graphs
3-
Version: 0.2.15.062
3+
Version: 0.2.15.063
44
Authors@R: c(
55
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre")),
66
person("Andreas", "Petutschnig", role = "aut"),

R/dists-categorical.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,13 @@ dodgr_dists_categorical <- function (graph,
8080
stop ("graphs with integer edge_type columns may not contain 0s")
8181
}
8282

83-
edge_type <- graph$edge_type
8483
graph <- tbl_to_df (graph)
8584

85+
if (get_turn_penalty (graph) > 0.0) {
86+
graph <- create_compound_junctions (graph)$graph # don't need compound edges here
87+
}
88+
edge_type <- graph$edge_type
89+
8690
hps <- get_heap (heap, graph)
8791
heap <- hps$heap
8892
graph <- hps$graph

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"codeRepository": "https://github.com/ATFutures/dodgr",
88
"issueTracker": "https://github.com/ATFutures/dodgr/issues",
99
"license": "https://spdx.org/licenses/GPL-3.0",
10-
"version": "0.2.15.062",
10+
"version": "0.2.15.063",
1111
"programmingLanguage": {
1212
"@type": "ComputerLanguage",
1313
"name": "R",

0 commit comments

Comments
 (0)