Skip to content

Commit

Permalink
Improve formatting of types of a few @param.
Browse files Browse the repository at this point in the history
  • Loading branch information
MLopez-Ibanez committed Nov 27, 2024
1 parent 886dd4c commit 20a48ce
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 32 deletions.
12 changes: 6 additions & 6 deletions R/multi_irace.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
#' }
#' Each of the `k` runs can be repeated `n` times by supplying a value for `n`.
#'
#' @param scenarios (`list()`) \cr A list of scenarios.
#' @param scenarios `list()`\cr A list of scenarios.
#' If only a single scenario is supplied, it is used for all parameters.
#' @param parameters (`list()`) \cr A list of parameter space definitions.
#' @param parameters `list()`\cr A list of parameter space definitions.
#' If only a single definition is supplied, it is used for all scenarios.
#' @param n (`integer(1)`) \cr The number of repetitions.
#' @param parallel (`integer(1)`) \cr The number of workers to use.
#' @param n `integer(1)`\cr The number of repetitions.
#' @param parallel `integer(1)`\cr The number of workers to use.
#' A value of `1` means sequential execution. Note that `parallel > 1` is not supported on Windows.
#' @param split_output (`logical(1)`) \cr If `TRUE`, the output of [irace()] is written to `{execDir}/run_{i}/irace.out`
#' @param split_output `logical(1)`\cr If `TRUE`, the output of [irace()] is written to `{execDir}/run_{i}/irace.out`
#' instead of the standard output.
#' @param global_seed (`integer(1)`) \cr The global seed used to seed the individual runs.
#' @param global_seed `integer(1)`\cr The global seed used to seed the individual runs.
#'
#' @return A list of the outputs of [irace()].
#'
Expand Down
17 changes: 8 additions & 9 deletions R/parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ Parameter <- function(name, type, domain, label, condition, transf,
#' - `param_int()` creates an integer parameter.
#'
#' @param ... one or more parameters created by `param_int()`, `param_real()`, `param_ord()`, or `param_cat()`.
#' @param forbidden (`expression()|character(1)`)\cr String or list of expressions that define forbidden parameter configurations.
#' @param forbidden `expression()|character(1)`\cr String or list of expressions that define forbidden parameter configurations.
#' @inheritParams readParameters
#'
#' @return (`ParameterSpace`)
#' @return `ParameterSpace`
#' @name parameters
#' @examples
#' digits <- 4L
Expand Down Expand Up @@ -400,10 +400,10 @@ ParameterSpace <- R6::R6Class("ParameterSpace", cloneable = TRUE, lock_class = T
}),
)

#' @param name Parameter name (must be alphanumeric).
#' @param values (`character()`) \cr Domain as a vector of strings.
#' @param label Label associated to the parameter. Often used to encode a command-line switch that activates the parameter.
#' @param condition (`expression(1)|character(1)`) \cr Expression that defines when the parameter is active according to the value of other parameters.
#' @param name `character(1)`\cr Parameter name (must be alphanumeric).
#' @param values `character()`\cr Domain as a vector of strings.
#' @param label `character(1)`\cr Label associated to the parameter. Often used to encode a command-line switch that activates the parameter.
#' @param condition `expression(1)|character(1)`\cr Expression that defines when the parameter is active according to the value of other parameters.
#' @rdname parameters
#' @export
param_cat <- function(name = name, values, label = "", condition = TRUE)
Expand All @@ -415,14 +415,13 @@ param_ord <- function(name, values, label = "", condition = TRUE)
Parameter(name = name, type = "o", domain = values, label = label, condition = condition, transf = "")

#' @param lower,upper Lower and upper limits of the valid domain.
#' @param transf (`character(1)`) \cr If `"log"`, then the parameter is sampled in a logarithmic scale.
#' @param transf `character(1)`\cr If `"log"`, then the parameter is sampled in a logarithmic scale.
#' @inheritParams readParameters
#' @rdname parameters
#' @export
param_real <- function(name, lower, upper, label = "", condition = TRUE, transf = "", digits = 15L)
Parameter(name = name, type = "r", domain = c(lower, upper), label = label, condition = condition, transf = transf, digits = digits)

#' @param transf (`character(1)`) \cr If `"log"`, then the parameter is sampled in a logarithmic scale.
#' @rdname parameters
#' @export
param_int <- function(name, lower, upper, label = "", condition = TRUE, transf = "")
Expand Down Expand Up @@ -658,7 +657,7 @@ param_quantile.ParamReal <- function(param, probs, domain = param[["domain"]])

#' Print parameter space in the textual format accepted by irace.
#'
#' @param parameters (`list()`) \cr Data structure containing the parameter
#' @param parameters `ParameterSpace`\cr Data structure containing the parameter
#' space definition. The data structure has to similar to the one returned by the
#' function [`readParameters`].
#'
Expand Down
2 changes: 1 addition & 1 deletion man/checkParameters.Rd

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

2 changes: 1 addition & 1 deletion man/configurations_print_command.Rd

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

12 changes: 6 additions & 6 deletions man/multi_irace.Rd

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

14 changes: 7 additions & 7 deletions man/parameters.Rd

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

2 changes: 1 addition & 1 deletion man/printParameters.Rd

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

2 changes: 1 addition & 1 deletion man/readConfigurationsFile.Rd

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

0 comments on commit 20a48ce

Please sign in to comment.