Skip to content

Commit a4419cf

Browse files
Copilotkrlmlr
andauthored
feat: change constructors to use explicit arguments (#2467)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
1 parent fda00ec commit a4419cf

37 files changed

Lines changed: 536 additions & 192 deletions

R/adjacency.R

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,25 @@ is_symmetric <- function(x) {
388388
}
389389

390390
#' @rdname graph_from_adjacency_matrix
391-
#' @param ... Passed to `graph_from_adjacency_matrix()`.
392391
#' @family adjacency
393392
#' @export
394-
from_adjacency <- function(...) {
395-
constructor_spec(graph_from_adjacency_matrix, ...)
393+
from_adjacency <- function(
394+
adjmatrix,
395+
mode = c("directed", "undirected", "max", "min", "upper", "lower", "plus"),
396+
weighted = NULL,
397+
diag = TRUE,
398+
add.colnames = NULL,
399+
add.rownames = NA
400+
) {
401+
constructor_spec(
402+
graph_from_adjacency_matrix,
403+
adjmatrix = adjmatrix,
404+
mode = mode,
405+
weighted = weighted,
406+
diag = diag,
407+
add.colnames = add.colnames,
408+
add.rownames = add.rownames
409+
)
396410
}
397411

398412
graph.adjacency.dense <- function(

0 commit comments

Comments
 (0)