Skip to content

Commit

Permalink
update uncontract_graph docs to close #236
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Aug 2, 2024
1 parent 390a1f8 commit fcb12d5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 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.4.1.017
Version: 0.4.1.018
Authors@R: c(
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")),
person("Andreas", "Petutschnig", role = "aut"),
Expand Down
12 changes: 11 additions & 1 deletion R/graph-contraction.R
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,20 @@ rm_edges_with_heterogenous_data <- function (graph, graph_contracted, gr_cols) {
#' Re-expand a contracted graph.
#'
#' Revert a contracted graph created with \link{dodgr_contract_graph} back to
#' the full, uncontracted version. This function is mostly used for the side
#' a full, uncontracted version. This function is mostly used for the side
#' effect of mapping any new columns inserted on to the contracted graph back
#' on to the original graph, as demonstrated in the example.
#'
#' Note that this function will generally *not* recover original graphs
#' submitted to \link{dodgr_contract_graph}. Specifically, the sequence
#' `dodgr_contract_graph(graph) |> dodgr_uncontract_graph()` will generally
#' produce a graph with fewer edges than the original. This is because graphs
#' may have multiple paths between a given pair of points. Contraction will
#' reduce these to the single path with the shortest weighted distance (or
#' time), and uncontraction will restore only that single edge with shortest
#' weighted distance, and not any original edges which may have had longer
#' weighted distances.
#'
#' @param graph A contracted graph created from \link{dodgr_contract_graph}.
#'
#' @return A single `data.frame` representing the equivalent original,
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codeRepository": "https://github.com/UrbanAnalyst/dodgr",
"issueTracker": "https://github.com/UrbanAnalyst/dodgr/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.4.1.017",
"version": "0.4.1.018",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
13 changes: 12 additions & 1 deletion man/dodgr_uncontract_graph.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fcb12d5

Please sign in to comment.