R/getBoxConstraints.R

Defines functions getUpperBoxConstraints.smoof_wrapped_function getUpperBoxConstraints.smoof_function getUpperBoxConstraints getLowerBoxConstraints.smoof_wrapped_function getLowerBoxConstraints.smoof_function getLowerBoxConstraints

Documented in getLowerBoxConstraints getUpperBoxConstraints

#' Return lower box constaints.
#'
#' @template arg_smoof_function
#' @return [\code{numeric}]
#' @export
getLowerBoxConstraints = function(fn) {
  UseMethod("getLowerBoxConstraints")
}

#' @export
getLowerBoxConstraints.smoof_function = function(fn) {
  getLower(getParamSet(fn), with.nr = TRUE)
}

#' @export
getLowerBoxConstraints.smoof_wrapped_function = function(fn) {
  return(getLowerBoxConstraints(getWrappedFunction(fn)))
}

#' Return upper box constaints.
#'
#' @template arg_smoof_function
#' @return [\code{numeric}]
#' @export
getUpperBoxConstraints = function(fn) {
  UseMethod("getUpperBoxConstraints")
}

#' @export
getUpperBoxConstraints.smoof_function = function(fn) {
  getUpper(getParamSet(fn), with.nr = TRUE)
}

#' @export
getUpperBoxConstraints.smoof_wrapped_function = function(fn) {
  return(getUpperBoxConstraints(getWrappedFunction(fn)))
}

Try the smoof package in your browser

Any scripts or data that you put into this service are public.

smoof documentation built on March 31, 2023, 11:48 p.m.