1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#' @title Check whether parameter setting lies in forbidden region of parameter set.
#'
#' @description
#' Parameter sets without a forbidden region always return \code{FALSE}.
#'
#' @template arg_parset
#' @param x [named \code{list}] \cr
#' Parameter setting to check.
#' @return [\code{logical(1)}].
#' @export
isForbidden = function(par.set, x) {
assertClass(par.set, "ParamSet")
#FIXME: check for correct names here
assertList(x)
if (!hasForbidden(par.set))
return(FALSE)
return(eval(par.set$forbidden, envir = x))
}
|