R/optimiser_class.R

Defines functions optimiser

Documented in optimiser

#' optimiser class
#'
#' A special class of iterator for selecting optimal parameter values
#' not intended to be called directly, this class should be inherited to provide
#' functionality for method-specific classes.
#' @export optimiser
#' @include generics.R parameter_class.R output_class.R model_class.R
#' @include iterator_class.R
#' @examples
#' OPT = optimiser()
#' @param ... named slots and their values.
#' @rdname optimiser
#' @return an optimiser object
optimiser = function(...) {
    # new object
    out = .optimiser(...)
    return(out)
}

.optimiser<-setClass(
    "optimiser",
    contains = c('iterator'),
    slots = c(type = 'character',
        outputs_optimal_model = 'model_OR_iterator'
    )
)

setClassUnion("model_OR_optimiser", c("model", "optimiser"))


setMethod(f = "show",
    signature = c("optimiser"),
    definition = function(object) {
        callNextMethod()
    }
)

Try the struct package in your browser

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

struct documentation built on Nov. 8, 2020, 8:14 p.m.