R/isNoisy.R

Defines functions isNoisy.smoof_wrapped_function isNoisy.smoof_function isNoisy

Documented in isNoisy

#' Checks whether the given function is noisy.
#'
#' @template arg_smoof_function
#' @return [\code{logical(1)}]
#' @export
isNoisy = function(fn) {
  UseMethod("isNoisy")
}

#' @export
isNoisy.smoof_function = function(fn) {
  return(attr(fn, "noisy"))
}

#' @export
isNoisy.smoof_wrapped_function = function(fn) {
  return(isNoisy(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.