From 46e0f2dd02ff424049f205778b0af8fc7ec7ed48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Mon, 24 Jun 2024 10:36:18 +0200 Subject: [PATCH] Explicit forwarding --- R/games.R | 20 ++++++++++++++++++-- man/sample_chung_lu.Rd | 10 ++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/R/games.R b/R/games.R index a01a2c052e..206cffed4e 100644 --- a/R/games.R +++ b/R/games.R @@ -2125,6 +2125,7 @@ sample_k_regular <- k_regular_game_impl #' graphs. Random Structures & Algorithms, 42, 480-508. #' \doi{10.1002/rsa.20450} #' +#' @inheritParams rlang::args_dots_empty #' @param out.weights A vector of non-negative vertex weights (or out-weights). #' In sparse graphs, these will be approximately equal to the expected #' (out-)degrees. @@ -2169,9 +2170,24 @@ sample_k_regular <- k_regular_game_impl sample_chung_lu <- chung_lu_game_impl #' @rdname sample_chung_lu -#' @param ... Passed to `sample_chung_lu()`. #' @export -chung_lu <- function(...) constructor_spec(sample_chung_lu, ...) +chung_lu <- function( + out.weights, + in.weights = NULL, + ..., + loops = TRUE, + variant = c("original", "maxent", "nr") +) { + variant <- rlang::arg_match(variant) + constructor_spec( + sample_chung_lu, + out.weights, + in.weights, + ..., + loops = loops, + variant = variant + ) +} #' Random graphs from vertex fitness scores diff --git a/man/sample_chung_lu.Rd b/man/sample_chung_lu.Rd index a078837d6d..2fbc3a195f 100644 --- a/man/sample_chung_lu.Rd +++ b/man/sample_chung_lu.Rd @@ -13,7 +13,13 @@ sample_chung_lu( variant = c("original", "maxent", "nr") ) -chung_lu(...) +chung_lu( + out.weights, + in.weights = NULL, + ..., + loops = TRUE, + variant = c("original", "maxent", "nr") +) } \arguments{ \item{out.weights}{A vector of non-negative vertex weights (or out-weights). @@ -24,7 +30,7 @@ In sparse graphs, these will be approximately equal to the expected the expected in-degrees in sparse graphs. May be set to \code{NULL}, in which case undirected graphs are generated.} -\item{...}{Passed to \code{sample_chung_lu()}.} +\item{...}{These dots are for future extensions and must be empty.} \item{loops}{Logical, whether to allow the creation of self-loops. Since vertex pairs are connected independently, setting this to \code{FALSE} is