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

#' Returns lower box constraints for a Smoof function.
#'
#' @template arg_smoof_function
#' @return [\code{numeric}]
#'  Numeric vector representing the lower box constraints
#' @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)))
}
jakobbossek/smoof documentation built on Feb. 17, 2024, 2:23 a.m.