R/core.makeMutator.R

Defines functions makeMutator mm

#' @title
#' Construct a mutation operator.
#'
#' @description
#' Helper function which constructs a mutator, i. e., a mutation operator.
#'
#' @param mutator [\code{function}]\cr
#'   Actual mutation operator.
#' @param supported [\code{character}]\cr
#'   Vector of strings/names of supported parameter representations. Possible choices:
#'   \dQuote{permutation}, \dQuote{float}, \dQuote{binary} or \dQuote{custom}.
#' @return [\code{ecr_mutator}]
#'   Mutator object.
#' @export
makeMutator = function(
  name = "Mutator",
  params,
  fun,
  representations = "custom") {
  EAMutator$new(
    name = name, params = params, fun = fun, representations = representations)
}

mm = function(...) {
  makeMutator(...)
}
jakobbossek/ecr3 documentation built on Nov. 14, 2019, 7:47 p.m.