Skip to content

Commit

Permalink
add 'pairwise' param in flow aggregation for #229
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Jun 5, 2024
1 parent c008b30 commit c6bc6ae
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 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.0.004
Version: 0.4.0.005
Authors@R: c(
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")),
person("Andreas", "Petutschnig", role = "aut"),
Expand Down
6 changes: 6 additions & 0 deletions R/flows.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#' calculated (see Details)
#' @param flows Matrix of flows with `nrow(flows)==length(from)` and
#' `ncol(flows)==length(to)`.
#' @param pairwise If `TRUE`, aggregate flows only only paths connecting the
#' ordered pairs of `from` and `to`. In this case, both `from` and `to` must be
#' of the same length, and `flows` must be either a vector of the same length,
#' or a matrix with only one column and same number of rows. `flows` then
#' quantifies the flows between each pair of `from` and `to` points.
#' @param contract If `TRUE` (default), calculate flows on contracted graph
#' before mapping them back on to the original full graph (recommended as this
#' will generally be much faster). `FALSE` should only be used if the `graph`
Expand Down Expand Up @@ -139,6 +144,7 @@ dodgr_flows_aggregate <- function (graph,
from,
to,
flows,
pairwise = FALSE,
contract = TRUE,
heap = "BHeap",
tol = 1e-12,
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.0.004",
"version": "0.4.0.005",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
7 changes: 7 additions & 0 deletions man/dodgr_flows_aggregate.Rd

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

0 comments on commit c6bc6ae

Please sign in to comment.